html tutorials web design help css tutorials free web graphics diy search engine optimization

How to Make a Redirect Page

Redirecting visitors from one page to another automatically isn't something you want to do too often. It should be used only when necessary because, if overused, search engines have been known to penalize a web site. It also tends to aggravate some people, the big babies.

Places to use a redirect page might include:

  1. When you remove a page or change a page name you can replace it with a redirect page so your visitor doesn't get a 404 error page.
  2. For an easy virtual "tour" of images. There are better ways, although they are more complicated.
  3. When you change your web site location, such as a move from a free host to another host or to your own domain.
  4. A thank you page after an order is submitted or form is filled out.
  5. When you just want to mess with people's heads. ;-)
Of course, there are many other reasons as well. If you can't think of any other reasons send me a dollar and I'll let it slide because my pet rock told me to play nice. Well—you can't argue with a pet rock, can you?

Redirect Code

Just paste this into the HEAD section of your HTML page:
<meta http-equiv="Refresh" 
 content="20; URL=">
Notice there are only double quotation marks before the 20 and after the .com That's not a mistake—do not insert quotation marks after the 20 or before the http as experience might dictate. That whole string is enclosed as the value to the content attribute.

In the above example, most users would be sent to my web site after 20 seconds. The only ones who wouldn't are those with older browsers that don't support the redirect tag. That's not many people, but it's still wise to include a link to the redirect destination for them, and for those who don't like waiting.

Change the time to fit your purpose, but I'd recommend setting it at no less than 10 seconds in most cases. Search engines are less likely to consider it a spam tactic that way.

Change the URL to the page you want to send them to. If you're redirecting them to a page on the same site, you don't have to include the full URL, and it will work faster if you don't. Just put in the page name and extension as long as it's in the same directory.

Well shucks, that was almost too easy, wasn't it?

Back | Web Design Tutorials Index

Ezine for Webmasters

Bookmark and Share

Almost a Newsletter

Changing list hosts. Will post a new subscribe form shortly.

Did you know...

The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ]
See my fancy bottom! :)