If you have been running a website for many years, you may find it necessary to change the URL of the site for some reason.
In such a case, the “meta refresh tag” has a convenient function that automatically takes visitors from the site with the old URL to the new site.
Using the meta refresh tag ensures that you don’t miss out on users visiting your site with the old URL.
In this article, we will explain the effect of the meta refresh tag and how to set it, so please use it.
Table of Contents
What is “meta refresh” that can be used in HTML?
A meta refresh is an HTML tag that automatically “redirects” site visitor access .
For example, when a user visits Site A (http://www.a-site.com), Site A has already been closed and refurbished to a new AA site (https://www.aa-site.com). If you did, you have to guide from A site to AA site.
As in the above example, when the content of the existing site is moved to a new separate page, the tag to transfer the user to the site with the new URL is meta refresh.
How to set redirect using meta refresh
HTML tags for meta refresh are as follows.
<meta http-equiv=”refresh” content=”seconds;URL=URL”>
When using HTML tags, it is necessary to predetermine the number of seconds to automatically redirect.
As a guideline for the number of seconds, do not stress the user.
We also need a description of the URL of the new site to direct users to.
Hypothetically, when redirecting from A site (http://www.a-site.com) to AA site (https://www.aa-site.com) in 10 seconds, write as follows .
<meta http-equiv=”refresh” content=”10;URL=https://www.aa-site.com”>
The meta refresh tag does not work inside the body tag and must be inside the head tag.
Therefore, please write it in the place enclosed by <head> ~ </head>.
By the way, in the case of WordPress, display the head tag in the following order and write the meta refresh tag.
- On the left sidebar of the admin screen, select Appearance → Theme Editor.
- Select header.php from the theme files on the right side of the theme editor
- Write a meta refresh tag in the <head> tag in the header.php file
In addition to the above, there is also a method using a plug-in, so please try to choose the method that is easy for you.
Read Also: What is the HTML strong tag?
Notes on redirects using meta refresh
There are a few caveats when using meta refresh.
The meta refresh tag is simple and easy to use because it is written in HTML, but you have to be careful that the SEO rating of the existing site may not be carried over.
If the existing site is evaluated in terms of SEO, it is recommended to use “301/302 redirect” .
301/302 redirects have the effect of taking over your SEO reputation.
While the meta refresh tag is described in the head tag within the website, the 301/302 redirect is described in “.htaccess” and operated on the server side.
However, it should be noted that 301/302 redirects may not be used if the degree of freedom on the server side where the website is installed is low.
Basically, 301/302 redirects are recommended, but use meta refresh only if you can’t use them for the reasons above.
[Summary of differences between meta refresh tags and 301/302 redirects]
- Installation location: Head tag within the website for the meta refresh tag / Server for 301/302 redirects
- Carryover of SEO effects: meta refresh tags may not be carried over / 301/302 redirects will be carried over
In this article, we introduced the functions and usage of the meta refresh tag.
The meta refresh tag is a tag that has the role of redirecting from the existing site to the newly created site, and it can be easily made to work just by writing it in the head.
However, it is necessary to be careful about the possibility that the SEO evaluation cannot be inherited. Basically, it is recommended to use “301/302 redirect” that can inherit the SEO evaluation.
However, depending on the conditions, 301/302 redirect may not work, so be sure to know how to use meta refresh in case of such a case.