301 Redirect: Tutorial and Course

301 Redirect: Tutorial and Course - 301 Redirect Tutorial and 301 Redirect Course, The Ultimate Guide to 301 Redirect. Learn 301 Redirect Tutorial and 301 Redirect Course at 301 Redirect Tutorial and Course.

301 Redirect Tutorial and 301 Redirect Course


301 Redirect: Overview


301 Redirect Tutorial and Course - 301 Redirect tutorial and 301 Redirect course, the ultimate guide to 301 Redirect, including facts and information about 301 Redirect. 301 Redirect Tutorial and Course is one of the ultimate created by to help you learn and understand 301 Redirect and the related SEO technologies, as well as facts and information about 301 Redirect.



301 Redirect: Tutorial and Course - 301 Redirect Tutorial and 301 Redirect Course by , The Ultimate Guide to 301 Redirect.



301 Redirect: Tutorial and Course


According to , 301 Redirect refers to the 301 Moved Permanently is used for permanent URL redirection, meaning this and all future requests should be directed to the given URI. 301 redirect is an instruction given to the web server, informing it that a page that was previously located at one URL has been moved permanently to a new URL. The 301 redirect is most commonly used in situations where a site has been rebuilt and the URLs have changed. By adding 301 redirects to the site you are able to avoid missed connections caused by traffic going to the old URL. When a 301 redirect is used, the search engines will also update their indexes to remove the old URL for the page and substitute the new one, thereby preserving the page's indexing.



Why Use 301 Redirect?


Redirects are HTML or server commands that automatically forward incoming links and users from one page's URL to another URL, which is an extremely useful Web site-maintenance technique.



Of the all types of redirects (301, 302, Meta Refresh, JavaScript redirect, PHP redirect, and so on), only the 301 redirect passes the test for search engine optimization (SEO) friendliness.



One common reason you may use 301 redirect is that you change your non-www domain to www domain or change www domain to non-www domian. Many websites don't handle the dual-version URL issue correctly. They end up with pages from both the www and the non-www URL versions indexed by the search engines. This is a problem because if both the www and non-www versions of a URL are indexed, your pages look like duplicates in the index - this causes the search engines to filter some of your pages out of their search results. Similarly, if there are links pointing to both versions (either internal links on your own site or external links originating on other Web sites), your link equity is diluted because it's split between the two URLs. (Link equity refers to the value of all your incoming links, which search engines use to determine your page's authority and expertise on its subject matter.)



There are many other reasons you should use 301 redirect. Whenever you make structural changes to your website, there is a risk that you will confuse the search engine and harm your search rankings. This can include changing your domain name, changing your content management system (CMS), redesigning your site - anything that fundamentally alters the landscape of your web presence.



You may decide to launch a site redesign as part of a rebranding of their business, a shift in their product lines, or a marketing makeover, or for a variety of other business reasons. During a site redesign, any number of things may change on the site. For example:





In many instances, 301 redirect is the best way to ensure that users and search engines are directed to the correct page.



How Does 301 Redirect Work?


The 301 redirect is the preferred and most SEO-friendly form of redirect. Also known as a permanent redirect, the 301 informs a search engine that the page has been permanently moved to a new location. This is the cleanest redirect because there's no ambiguity - the search engines get a clear message that one page is history, and some other URL has now taken its place.



A 301 redirect is kind of like that "WE'VE MOVED" sign, but better. On the Web, visitors don't even have to realize you've moved. Your Web site automatically redirects them to the new URL and displays the new page.



The 301 redirect tells the search engine that the page at location A has permanently moved to location B. It says that one URL is forever replaced by another URL, it is a very clear-cut, unambiguous message. The search engine responds by doing three things:





Best Practices For 301 Redirect


If you are planning on switching to a new domain, get your new domain indexed and recognized by the search engines as soon as possible.



Then, register the new domain with Google Webmaster Central and Bing Webmaster Tools. This is just another part of making sure Google and Bing know about your new domain as early as possible and in as many ways as possible.



Once this is done, here are the best practices for you:





Apache 301 Redirect


We've seen many cases where Apache is used as a web server, and redirecting pages or sites on an Apache Web server is very easy. You do it by modifying a file on your Web site called the .htaccess file. The .htaccess file is a control file that allows server configuration changes on a per-directory basis. The file controls that directory and all of the subdirectories contained within it. Usually, this file is placed in the root folder of your Web site. It is very important that when you edit Apache files that your editor saves the file in UNIX format or errors may occur.



The .htaccess file should be set up by default, but if your root folder doesn't contain the file, have someone who understands how to build an .htaccess file create it. Be careful here. Some upload (FTP) programs hide the .htaccess. You don't want to overwrite an existing .htaccess with your update.



Here is an example using 301 Redirect to redirect www domain to non-www domain:



 Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] 


Here is an example using 301 Redirect to redirect non-www domain to www domain:



 Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.example\.com$ RewriteRule ^(.*) http://www.example.com/$1 [R=301,L] 


IIS 301 Redirect


Whereas an Apache server is comparatively easy to deal with, IIS is much more complex. If your Web site resides on a Microsoft IIS server, you must have administrator-level access rights in order to set up a 301 redirect. You can add greater flexibility to your IIS server by installing a plug-in called ISAPI_Rewrite. With this plug-in, you can access your Web files without needing administrator access rights to the server. (We recommend that you request the ISAPI_Rewrite for your IIS server because with it you can work with the files hands-on, rather than relying on a third-party to make the changes you need.)



To redirect page(s) on your Web site, you must first know the URL(s) of each Web page/site you want to redirect, and the URL(s) of the new page/site where each will be directed to.



NGINX 301 Redirect


NGINX is a high-performance web server designed to use very few system resources, as well as a load balancer and HTTP cache. Now, the resources and documents about NGINX SEO is very few, so we offer this document for you, hopefully this document will help you to create the customized 301 Permanent redirects in your NGINX config file.



NGINX Domain 301 Redirect

Avoid redirecting pages, and keep the URL the same when rebuilding a site when you can, and if the URL architectures of both sites are identical except the domain name. You can redirect the entire domain to the new one by modifying the NGINX config file.



Here is an example using 301 Redirect to redirect www domain to non-www domain:



 server { server_name www.example.com; rewrite ^/(.*)$ http://example.com/$1 permanent; } 


Here is an example using 301 Redirect to redirect non-www domain to www domain:



 server { server_name example.com; rewrite ^/(.*)$ http://www.example.com/$1 permanent; } 


NGINX Directory 301 Redirect

Here is an example using 301 Redirect to redirect to old directory to new directory:



 if ( $request_filename ~ old_directory/.+ ) { rewrite ^(.*) http://www.example.com/new_directory/$1 permanent; } 


Here is an example using 301 Redirect to redirect to old directory to top level pages on your site:



 if ( $request_filename ~ old_directory/.+ ) { rewrite ^(.*) http://www.example.com/$1 permanent; } 


NGINX Single Page 301 Redirect

There are many reasons you should use 301 redirect single pages. For example, whenever you reresign a site, remove pages, rename pages, and so on. By adding 301 redirects to the site you are able to avoid missed connections caused by traffic going to the old URL. When a 301 redirect is used, the search engines will also update their indexes to remove the old URL for the page and substitute the new one, thereby preserving the page's indexing.



Here is an example using 301 Redirect to redirect old_page to new_page:



 if ( $request_filename ~ old_page/ ) { rewrite ^ http://example.com/new_page/? permanent; } 


301 Redirect: Further Reading