Webmasters use ‘Redirects’ when they want to forward visitors from one page to another on the same site or from one domain to another domain.
Search engines have been wary of such redirects because, though redirects are a normal part of how the web operates, and are very valuable when well used but can mislead the search engines and if sneaky may result in spam on the web.
Google guidelines support the ethical and correct use of such redirects but Google may respond negatively to misleading and manipulative practices of such a facility.
Basic Google Quality Guidelines Are As Follows:
- Make pages primarily for users, not for search engines.
- Don't deceive your users.
- Avoid tricks intended to improve search engine rankings. A good rule of thumb is whether you'd feel comfortable explaining what you've done to a website that competes with you, or to a Google employee. Another useful test is to ask, "Does this help my users? Would I do this if search engines didn't exist?"
- Think about what makes your website unique, valuable, or engaging. Make your website stand out from others in your field.
There are many good reasons to redirect one URL to another, such as when moving your site to a new address, or consolidating several pages into one. However, some redirects deceive search engines or display content to human users that is different than that made available to crawlers.
Redirects are particularly useful and considered as ethical by search engines in the following circumstances:
- You've moved your site to a new domain, and you want to make the transition as seamless as possible.
- People access your site through several different URLs. If, for example, your home page can be reached in multiple ways - for instance, http://example.com/home, http://home.example.com, or http://www.example.com - it's a good idea to pick one of those URLs as your preferred (canonical) destination, and use 301 redirects to send traffic from the other URLs to your preferred URL.
- You're merging two websites and want to make sure that links to outdated URLs are redirected to the correct pages.
The Redirect can be determined as a correct one or a sneaky one depending on the intention of its redirection.
Some examples of sneaky redirects include:
- Search engines shown one type of content while users are redirected to something significantly different.
- Desktop users receive a normal page, while mobile users are redirected to a completely different spam domain.
Types of Redirects:
- 301, "Moved Permanently"—SEO Friendly
- 302, "Moved Temporarily"
- Meta Refresh
- JavaScript Redirect
- URL Redirection Service
301 Moved Permanently
The 301 redirect is a permanent redirection. It indicates that the resource has moved permanently and people should update their information for this URL. A 301 redirect passes between 90-99% of link juice (ranking power) to the redirected page. 301 refers to the HTTP status code for this type of redirect. In most instances, the 301 redirect is the best method for implementing redirects on a website.
302 Moved Temporarily
A 302 redirect is a temporary redirect. It passes 0% of link juice (ranking power) and, in most cases, should not be used.
Meta Refresh
Meta refreshes are a type of redirect executed on the page level rather than the server level. They are usually slower, and not a recommended SEO technique. They are most commonly associated with a five-second countdown with the text "If you are not redirected in five seconds, click here."
JavaScript Redirects
JavaScript can cause a redirect by setting the window.location attribute, e.g.:
window.location='http://www.example.com/'
Normally JavaScript pushes the redirector site's URL to the browser's history. It can cause redirect loops when users hit the back button. With the following command you can prevent this type of behaviour.
window.location.replace('http://www.example.com/')
As per google Using JavaScript to redirect users can be a legitimate practice. For example, if you redirect users to an internal page once they’re logged in, you can use JavaScript to do so. When examining JavaScript or other redirect methods to ensure your site adheres to our guidelines, consider the intent. Keep in mind that 301 redirects are best when moving your site, but you could use a JavaScript redirect for this purpose if you don’t have access to your website’s server.
URL Redirection Services
A redirect service is an information management system, which provides an internet link that redirects users to the desired content. The typical benefit to the user is the use of a memorable domain name, and a reduction in the length of the URL or web address. A redirecting link can also be used as a permanent address for content that frequently changes hosts, similarly to the Domain Name System.
At times a hacking attack can result to sneaky redirects. Hackers might inject malicious code to your website that redirects some users to harmful or spammy pages. The kind of redirect sometimes depends on referrer, user-agent, or device. For example, clicking a URL in Google search results could redirect you to a suspicious page, but there is no redirect when you visit the same URL directly from a browser.
If your site has been hacked or infected with malware, you should act quickly to repair the damage. Google recommends reviewing the recommendations provided by the organization antiphishing.org.