Why you should implement a Redirect to another Domain
If you move your content from your old domain to another one, you might want to think about implementing a redirect link on your old domain. If you do not, users who go to the old version of your site e.g. because they bookmarked your old domain, will be confronted with the page ‘not found (404) error’. Instead, if you implement the redirect to another domain correctly, users will be sent to the new versions of your web page and won’t see the 404 error. Furthermore, a working redirect will not only tell the user, but also the browser or spider that the content has been moved and that they have to get it from the new URL. It is also important for search engines as they want to have your new URL in their index and showing it in their search results.
When you might need to redirect to another Domain
- You remove content, because it expires
- You have broken URLs which generate traffic
- You change your hosting company
- You change your CMS
- You want to implement a canonical redirect (redirect all pages on http:// yourdomain.com to http:// www.yourdomain.com).
- You change your URL in general
Note: The scenarios above only require a redirect to another domain if you really change your URL.
Types of Redirects
There are two major types of redirects which are affected by the HTTP status code returned by the web server. One is the 301 redirect (301 moved permanently), this status code tells the browser or crawler that the content has been moved permanently to a different site and there is no intent to move it back again. The other one is the 302 redirect (302 moved temporarily), which says that the content has been moved temporarily and will come back to that location. Both forms, the HTTP 301 and the HTTP 302, redirect the URL but the interpretation is quite different. When a crawler sees a 301 HTTP status code, the search engine will remove the old domain from its index, replace it and pass the historical link authority to the new domain. This is critical for SEO as if you would not have a 301 on your site, you would lose all your link-building efforts you did for the old domain.
When a crawler sees a 302 HTTP status code, it will not pass the historical link authority from the old site to the new one, as content has been only moved temporarily.
Besides that it is important to know that there are also redirects which do not pass a status code or are not implemented correctly such as the 404 error or a 200 OK page loaded successfully. A 303 redirect or a 307 redirect are also forms of status codes which should be avoided as it is not clear how the search engine responds to them. Click here, to dive deeper into the topic.
How to redirect a URL
Redirect on Apache Web Servers
If you have a machine running Unix or Linux, you are probably operating on Apache web servers. The easiest way to implement a redirect to another domain on Apache web servers, is through a standard file called .htaccess using the Redirect and RedirectMatch directives. Another way to redirect to another domain is to use the Apache module mod_rewrite to employ more advanced directives.
Redirect on Microsoft IIS
If you are operating on a machine running Microsoft IIS the basic method to redirect to another domain is through the IIS console. With the ISAP plug in ISAPI_Rewrite, you can also make use of a text file with directives. Another method is to use programming languages to create e.g. a PHP redirect. For this it is important to know that the HTTP status code has to be a 301 which can be checked e.g. with the Firefox plug-in Live HTTP Headers. You can also implement a redirect via the meta refresh tag < meta http-equiv =” refresh” content =” 5; url = http:// www.yourdomain.com/ newlocation.htm” />. The 5 stands for the number of seconds it takes to redirect the user, so this method is great, if you want to display a site saying that the user will get redirected. But be cautious as if you put seconds in, your code will be treated as a 302 redirect. Only if you put 0 seconds, your code will be a 301. If you want to learn more about the technical details, visit this site.
by Ellen Keller