How to create a Meta Refresh

There are a variety of reasons why you might need to "bounce" traffic to a different page than the one they came in on. Over the years I've added and removed numerous web pages. When you remove a page, you don't prevent traffic from trying to reach the page. If you don't do something to "replace" the page, that traffic will get your 404 page.

There are a variety of options, but the one that I prefer (at least of late) is to leave the file, but put a meta refresh in its place. While some folks might say this is bad for search, google says "you shouldn't create your pages for search, instead create them for people!" Besides, this technique makes it much easier to manage a site with many pages. As a webmaster, I can see any file that has existed... without having to scan through my .htaccess, or rely on web server features controlled by whomever might be hosting my files currently.

I can tell the meta refresh files from the other content files because they tend to be noticeably smaller from a filesize standpoint. I like seeing the meta refresh files along side their counterparts because it's very easy to re-task a file if I want to revive the URL.

Here's an example of the syntax for a meta refresh. This example would bounce the visitor to www.esqsoft.com 5 seconds after the document had loaded. This needs to go between the <HEAD> and </HEAD> tags in your HTML.

<meta http-equiv="Refresh" content="5;url=http://www.esqsoft.com">

Related Keywords: meta refresh, redirect, prevent a 404