Forum Moderators: phranque

Message Too Old, No Replies

301 redirect

Should I delete the old file?

         

chabbs

4:13 am on Jun 25, 2004 (gmt 0)

10+ Year Member



Hello Everyone,

When performing a redirect should I delete the old file or keep it until the new page is indexed?

jdMorgan

4:47 am on Jun 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



chabbs,

If your redirect is correctly implemented, the old file can no longer be reached at it's old URL -- the redirect will take precedence. Therefore, it doesn't matter whether the file exists or not.

Jim

chabbs

10:59 am on Jun 25, 2004 (gmt 0)

10+ Year Member



Thanks Jim, I had the impression that a search engine could still spider the old file.

goodroi

3:02 pm on Jun 25, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



The old individual html file is a non factor. If you are taking about a 301 for a domain, you should make sure that you have migrated all of the links and then you can stop hosting the old domain.

weebie

4:57 pm on Jun 26, 2004 (gmt 0)

10+ Year Member



My understanding of redirect (from inside old file?) is that you will have 302 "Temporary" file moved code returned - not a 301 ("Permanent").

How is this implemented? On my server I have to use a 404 error handler to produce a 301 code for spiders and users. This means the file has to be unavailable for the 404 Handler to kick in.

Many other good threads around on this site discussing differences - try a search for more info?

jdMorgan

6:46 pm on Jun 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> My understanding of redirect (from inside old file?) is that you will have 302 "Temporary" file moved code returned - not a 301 ("Permanent").

I think you are referring to a meta-refresh, which is not technically a redirect. In this case, the browser itself simply fetches the new page after the specified interval. There is no dependency on a server 301 or 302 response in this case.

> How is this implemented? On my server I have to use a 404 error handler to produce a 301 code for spiders and users. This means the file has to be unavailable for the 404 Handler to kick in.

It depends on what server you are hosted on, and what privileges your are granted. On free and cheap hosting, your options are often quite limited.

There are hundreds of threads here on redirects, so it's a good idea to include your server name (e.g. Apache [google.com] or IIS [google.com]) to limit the results.

[added] ... and after installing any redirect, be sure to check to be sure you are getting the results you expected, or you can seriously confuse the search engines. Use the Server Headers checker [webmasterworld.com] or something similar. [/added]

Jim

chabbs

8:42 pm on Jun 26, 2004 (gmt 0)

10+ Year Member



This is the answer that I got after using the server headers checker. Does this seem to be ok?

HTTP/1.1 301 Moved Permanently
Date: Sat, 26 Jun 2004 20:35:07 GMT
Server: Apache/1.3.31 (Unix) mod_auth_passthrough/1.8 mod_tsunami/2.0 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.4 FrontPage/5.0.2.2634a mod_ssl/2.8.18 OpenSSL/0.9.7d
Location: htp://www.XXXXXXX.com/directories.html
Connection: close
Content-Type: text/html; charset=iso-8859-1

jdMorgan

9:11 pm on Jun 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> HTTP/1.1 301 Moved Permanently

That's what you wanted, so the redirect response is fine.

However, the new location looks incorrect - the link is saying to use the protocol "htp:" instead of "http:" -- a typo when posting here maybe, or intentional to disable this forum's auto-linking?

htp://www.XXXXXXX.com/directories.html

As long as the new URL is correct, you're all set up.

Jim

chabbs

9:26 pm on Jun 26, 2004 (gmt 0)

10+ Year Member



Yes I did it on purpose. After I added the xs I clicked the link and it actually brought me to a website so I removed the t from http.

Thanks for the help, it's much appreciated.