?
Solved

Correct 301 Redirect Usage?

Posted on 2006-11-22
4
Medium Priority
?
194 Views
Last Modified: 2010-03-04
I'm changing the file extension of my main index file from .html to .php, therefore I've chosen to use a 301 redirect for SEO purposes, so that I don't lose my current PageRank, backlinks, etc.

So in my .htaccess file I would use:

Redirect 301 /oldindex.html http://www,domain,com/newindex.php

Now, am I supposed to delete the old index file once I create the new one? OR do I keep the old index AND the new index in the same directory?

Also, how long should I keep the 301 redirect active? I've read from some people that it should be kept active forever, but wouldn't common sense tell us that it's safe to remove the 301 redirect once the search engines replace the old index with the new one?

Thanks.
0
Comment
Question by:lightmatrix
2 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 560 total points
ID: 17995014
After the redirect works, You may remove the old file.
There's no suggestion how long You should keep the redirect in place. Forever seems to be safest ;)
0
 
LVL 13

Assisted Solution

by:rhickmott
rhickmott earned 560 total points
ID: 17995117
If the redirect works the old page will NEVER be accessed as apache will simply kick them onto the new page and not serve it so its safe to delete.

As for how long thats entirely up to you. Theres no harm in leaving it active, once the search engines have updated their records requests for the old one will vanish but general sense says there is always some search engine nobody has heared about who will use it at one point or another.

You *can* always use a rewrite so that that a request for x.html will serve up x.php if you use a dynamic page indexing system such as page.php?action=y then search engines end to favour a url of x.htm rather than the former.


0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question