Results 1 to 12 of 12
  1. #1
    Join Date
    Oct 2005
    Posts
    436

    How to tell search engines that a site's pages have moved?

    I recently converted a small static site for a nonprofit to a CMS.

    How do I tell Google (which has indexed almost the entire site) that the pages previously found at, say, www.example.com/contact.htm etc have now changed to www.example.com/contact and so on?

    Almost all the pages have now been changed.

  2. #2
    Join Date
    Jan 2006
    Location
    Athens, Greece
    Posts
    1,479
    Maybe a rewrite rule

    RewriteRule (.*)\.htm $1 [L,QSA]

  3. #3

  4. #4
    Join Date
    Oct 2005
    Posts
    436
    Steve_Arm and nuclei, thank you both for your answers.

    nuclei, a few more questions:

    • I suppose I would need to add RewriteRule line for each old url that I want to be permanently redirected, correct?
    • Can I remove these rewrite rules after I have made sure that Google and other serarch engines have indexed the new pages?
    • Would I need to add an L next to the 301 like this - RewriteRule ^contact.php /contact [R=301, L]?


    Thank you very much.

  5. #5
    #1: You will need individual rewrites, unless you have made sure that the entire structure of the website has changed to allow for a "catch-all" rewrite such as:

    RewriteRule ^(.*).php /$1 [R=301]

    wich will do the exact same thing as the indivul pages, except that it catches all /anypagename.php and 301's it to /anypagename

    #2. Once the engines have recognized the new page location, they will update their index with the new structure and then, yes, you can remove the 301's.

    #3: You would only need to use "L" if you have rules following the first match for that particular page that also match that exact page.

    As a sidenote, some servers setup may require you to escape the . in the rewrite ie: anypage\.php as steves example showed him doing. It wont hurt to always escape it and is probably good practice.
    Last edited by nuclei; 04-20-2008 at 01:35 AM.

  6. #6
    Join Date
    Oct 2005
    Posts
    436
    I will go with individual rewrites as the structure has changed way too much. I will also escape the . as suggested.

    Thanks very much indeed for taking the time to help me out with this tricky thing. Much obliged.

  7. #7

  8. #8
    Google Webmaster Tools allows you to remove directories, individual pages, or the entire site from their index.

    If the URL in question returns a 404 when Google crawls your site again, it won't be added back into the index.

    If it had any links pointing to it, create a 301 redirect. If it didn't, there's not really any need if you use WT to remove it. Yahoo has a similar feature in their Site Explorer.
    <<< Please see Forum Guidelines for signature setup. >>>

  9. #9
    Join Date
    Mar 2008
    Location
    SEO cyberspace
    Posts
    423
    The OP is asking about how to make sure that the new pages get credit for links etc pointing to the old indexed pages not how to remove pages from the index.
    I plan to live forever - so far so good
    Expert SEO |Sash Windows London

  10. #10
    Join Date
    Oct 2005
    Posts
    436
    nuclei, I missed this before. Would you mind explaining it a bit more with an example?

    #3: You would only need to use "L" if you have rules following the first match for that particular page that also match that exact page.
    awhite1, Melnel is correct. I am not looking to remove the pages from Google's index.

  11. #11
    Join Date
    Oct 2005
    Posts
    436
    I am not sure I did the redirect correctly because most of the pages have disappeared from the index, unfortunately.

    One of the old pages had the following url:
    www.domain.com/contact_domain.htm

    I wrote the rewrite rule like this:
    RewriteRule ^contact_domain\.htm /contact [R=301]

    This hasn't been redirected at all and the old page is still there. The rewrite engine is very much on as the CMS has it on by default for clean urls.

    Is there anything I am doing wrong?

    Thanks in advance,
    Ramdak

  12. #12
    Join Date
    Feb 2007
    Posts
    268
    The 301 redirect command can be excellent, especially if you are concerned over the transfer of PR from your older site to the new one.

    And even if you are not in that position to worry about PR, simply transferring the files to the new server and waiting for some time will do the job.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •