HTML Redirect code to another page: meta refresh explained
The HTML redirect code you're looking for is called the "meta refresh element":
<meta http-equiv="refresh" content="0; url=$URL">
With one line of HTML code you can redirect visitors to another URL or page.
Similarly to other meta tags, you need to place the meta refresh element in the
<head>-section of a page, and it contains a parameter to instruct a browser to load another URL (refresh the page) after a certain number of seconds.
The HTML redirect code
Here's an example of what the meta refresh redirect looks like to send a visitor to
https://www.contentkingapp.com/ immediately after loading a page:
Check your website for excessive redirects, and incorrect configurations right now!
HTML redirects and SEO
From an SEO point of view it's not recommended to use HTML redirects because:
- Search engines are slow to pick up on them than they would on 301 redirects, because they need to parse the HTML to find the HTML redirect.
- There's no guarantee the redirect is picked up correctly, therefore it's unsure if you'll see the same amount of authority being passed on as you'd see with a 301 redirect.
- HTML redirects make for a slower user experience than for instance a 301 redirect.