This site uses cookies and other tracking technologies to make possible your usage of the website, assist with navigation and your ability to provide feedback, analyse your use of our products and services, assist with our promotional and marketing efforts, and provide better user experience.

By using the website, you agree to our Privacy policy

Accept and continue

Close

Report a bug

Cancel
50
How-to 6 min read September 5, 2019

Why meta refresh and JavaScript-redirects need to be abandoned

Forced redirects like Meta Refresh or JavaScript cause an ambiguous reaction among users and search engines, and can also negatively affect the indexing of site pages. Therefore, it is better to refuse such a redirect in favor of a 301 redirect.

How the Refresh Meta Tag Works

The user visits one page, but it is updated immediately or after a certain period of time. This method was often used when creating doorways, so it is not surprising that the search services struggle with the Meta Refresh redirect.

In addition to black methods, webmasters used such redirects when:

  • moving the site to another domain;
  • directing the user to the main page after the purchase in order to improve usability;
  • giving the user new information after a certain period of time;
  • needs to complete the next step for a purchase or other action on the website;
  • using outdated versions of browsers when redirect scripts do not work on the user's page or Cookies support is disabled.

In the HTML code, the redirect line looks like this:
<meta http-equiv="refresh" content="7">
Or like this:
<meta http-equiv="refresh" content="2; URL = http: /site.ru">
In the first case, HTML is redirected in 7 seconds. In the second, the page will refresh in 2 seconds, and the user will see a completely different site in front of him. Search engines are punished for such actions with filters and even a ban.

Here's what Google support said about this:
Google recommendations on redirects meta refresh
Google's lead analyst John Muller writes that using Refresh can index other content. The bot perceives this meta tag as a redirect and, as a result, scans information after updating it.
John Muller's HTML Refresh Recommendations

Disadvantages of a Refresh Redirect

1
Clogs the page history.
2
The "Back" button may not work in the user's browser (depending on the version of the browser and the prescribed code).
3
As a result, the wrong page may be indexed. For example, after the perfect action, the user is directed to the page with the text of gratitude. The bot can automatically index the second page instead of the first.
4
Restriction of user freedom. Pages reload automatically, and this is annoying.
5
A search bot can identify a page with a meta redirect as spam. As a result, the filter will be imposed on this page or the entire site.
6
In older versions of the browser, such transitions may not work correctly.

How JavaScript redirects work

Some webmasters have used this redirect to trick search algorithms. After all, the information is processed only at the browser level, which means it is not transmitted to the server. Indeed, most search engines do not index JS redirects, but not Google. This bot is able to recognize such a redirect.

Here's what the JS redirect looks like in practice:
<script type="text/javascript">
  location="http://serpstat.com";
  document.location.href="http://serpstat.com";
  location.replace("http://serpstat.com");
  window.location.reload("http://serpstat.com");
  document.location.replace("http://serpstat.com");
</script>
In this case, you will redirect the user from the original page to serpstat.com. If you add a function:
<script>
  setTimeout( 'location="http://serpstat.com";', 3000 );
</script>
You set the interval to 3 seconds after which a redirect to another site will occur.

Disadvantages of JavaScript redirects

Sometimes JavaScript is disabled in browsers for security reasons. Then the update will not work. And if it does happen, then the Google search bot may index the wrong page.

Here a situation occurs that is identical to using the Refresh meta tag. Such redirects are justified only in one case: if, after a certain user action, it is necessary to make a double redirect to improve behavioral factors.

For example, in the online store, after the purchase, a 301 redirect to the thank you page or further instructions is triggered. After that, it is advisable to direct the user to the main or subscription page. A double 301 redirect has a bad effect on SEO optimization. Then it is allowed to use the Refresh tag. In other cases, it is better to refuse such manipulations.

Conclusion

Using redirects such as Refresh or JavaScript can adversely affect site indexing. Search bots can identify pages with such redirects as spam, and the user will not like updating information without his consent.

Any fraud of a user or search engine is not acceptable for SEO: it is instantly recognized by search engines. For this, the site is excluded from the search or underestimated. And restoring an honest domain name after such an error can be extremely difficult.

If the site at least once fell under the filters of search engines, then even after their removal the resource will advance worse. As a result, you will have to register a new domain.

In addition to the possible consequences of sanctions, redirects using JavaScript may simply not work in some browsers. Therefore, it is better to refuse such forwarding in favor of server 301 redirects. This recommendation is also given by Google.

This article is a part of Serpstat's Checklist tool
Checklist at Serpstat
Checklist is a ready-to-do list that helps to keep reporting of the work progress on a specific project. The tool contains templates with an extensive list of project development parameters where you can also add your own items and plans.
Try Checklist now

Learn how to get the most out of Serpstat

Want to get a personal demo, trial period or bunch of successful use cases?

Send a request and our expert will contact you ;)

Rate the article on a five-point scale

The article has already been rated by 0 people on average out of 5
Found an error? Select it and press Ctrl + Enter to tell us

Share this article with your friends

Sign In Free Sign Up

You’ve reached your query limit.

Or email
Forgot password?
Or email
Back To Login

Don’t worry! Just fill in your email and we’ll send over your password.

Are you sure?

Awesome!

To complete your registration you need to enter your phone number

Back

We sent confirmation code to your phone number

Your phone Resend code Queries left

Something went wrong.

Contact our support team
Or confirm the registration using the Telegram bot Follow this link
Please pick the project to work on

Personal demonstration

Serpstat is all about saving time, and we want to save yours! One of our specialists will contact you and discuss options going forward.

These may include a personal demonstration, a trial period, comprehensive training articles & webinar recordings, and custom advice from a Serpstat specialist. It is our goal to make you feel comfortable while using Serpstat.

Name

Email

Phone

We are glad of your comment
Upgrade your plan

Upgrade your plan

Export is not available for your account. Please upgrade to Lite or higher to get access to the tool. Learn more

Sign Up Free

Спасибо, мы с вами свяжемся в ближайшее время

Invite
View Editing

E-mail
Message
Optional
E-mail
Message
Optional

You have run out of limits

You have reached the limit for the number of created projects. You cannot create new projects unless you increase the limits or delete existing projects.

I want more limits