In a web debugger, the html of a 301 redirect page shows up as:

<title>301 Moved Permanently</title>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.website.com/webpage.htm">here</a>.</p>

I'm having to redirect html pages without server support. If I replace the pages html with the code above, will that work the same as writing 301 redirects in .htaccess on apache? I looked this up on google, but the sites talking about 301 redirects didn't cover this option for redirecting html pages.

3 Answers 3


Ideally you will send a 301 HTTP response status code. If you can't do that a meta refresh that is immediate will also work and be counted as a 301 or 302 redirect depending on the search engine.

<meta http-equiv="refresh" content="0;url=http://example.com/new.html">

The refresh rate must be zero for it to be considered a 30x redirect.

  • Thanks, that article articulates the process really well. 0 delay meta refresh inside my html example above = poor man's 301.
    – JMC
    Commented May 13, 2011 at 2:49

No, simply replacing the HTML with your example will not achieve the effect you're looking for. It will simply show that page to the user, since Apache will send a '200' status code along with it. Users will be able to click the link to find the page but it will not happen automatically and spiders will not know that you mean to effect a permanent redirection of the resource.

You will need to use a proper Redirect or _mod_rewrite_ directive in either .htaccess or your Apache conf files.

Alternatively, if you are actually using PHP or something similar you can set the return code to 301, output a Location response header and then your page based solution will work. In PHP it would look something like this:

header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: http://www.new-url.com" );
  • +1 Good points about the 200 status code. Didn't think about that. Unfortunately it's an IIS server and i don't have access deeper than ftp. The pages are .html so an asp redirect won't process.
    – JMC
    Commented May 13, 2011 at 2:53
  • In that case John Conde's answer is best -- I'd forgotten about meta refresh equivalence. Commented May 13, 2011 at 7:30

Agree with Hissohathair in that your approach will not actually redirect. Users may know to click the link, but the original page will still return a normal '200' status code and continue to show up on search results (probably not quite what you want).

In order to maintain page rank, 301 status codes are extremely important. Adding meta refresh tags is also a good option and may help in most cases (as per John's response), but you may not be guaranteed that the search engines will accept it as a 301 redirect in the future. Adding proper redirects to your .htaccess (or Apache conf files) would be your best option in order to guarantee the 301 status code is being sent.



For an IIS7 website, as long as the IIS URL Rewrite module is installed, you can create redirect rules in the web.config for the site. These rules would apply to .html files as well. More info here:



Another alternative if your web host does not have .htaccess/mod_rewrite capabilities might be to change the web host you are using where you can setup server-side redirects. As long as the site is properly moved, it should be fairly seamless to your users. This approach would only be for extreme cases if maintaining page rank is highly critical.

Not the answer you're looking for? Browse other questions tagged or ask your own question.