11 replies
hi there guys and gals hope everyone is having a great weekend

my question to you is this

i have been building a testing a website on my server and it's been indexed but when it goes live it will be running on it's on domain name so two questions:
i want to do a redirect - all pages are html - can i add a .htaccess to the directory where they are stored ie they are stored in a directory called projects which is a sub directory of the root directory

second question how do i then make sure the pages on the test server get de-indexed so that the new site on the correct domain will get indexed

thanks

r
#301 #redirects
  • Profile picture of the author theIMgeek
    You can use an htaccess file to return code 301 and redirect browsers to the new location. Just make sure that the htaccess file is left where the site is currently. (no good to have the htaccess under the new domain.)

    Google Webmaster has a tool to tell the search engine that a domain has been changed. However, it sounds like your site is currently living in a sibfolder of another domain, so this may not apply to you. Telling Google about your domain change - Webmaster Tools Help

    -Ryan
    Signature
    FREE WSO: Protect and Automatically Deliver Your Digital Products

    Ask the Internet Marketing Geek
    <-- Happy to help with technical challenges
    MiniSiteMaker.org <-- Free software to make your mini-sites fast and easy
    {{ DiscussionBoard.errors[2002858].message }}
    • Profile picture of the author mr. b
      1. Redirects in htaccess is easy:

      Code:
      Redirect 301 /your-old-page.html hxxp:// www . site . com/your-new-page.html

      2. Google will automatically de-index your pages if they are unavailable...
      {{ DiscussionBoard.errors[2003451].message }}
  • Profile picture of the author thesuccesscoach
    thanks guys that's really helpful ok once i get the new domain i will do that, however since the test pages are in say mywebsitedomain.com/projects/myproject.html shoud i put a .htaccess in the projects folder or can i put it in the .htaccess for example
    Redirect 301 /projects/your-old-page.html hxxp:// www . site . com/your-new-page.html
    Signature

    A life and business coach
    Ready to help you make it happen, just ask!

    {{ DiscussionBoard.errors[2003568].message }}
  • Profile picture of the author theIMgeek
    Since it sounds like you want to redirect EVERY page you don't have to write a line for each individual file. You can redirect the whole folder.

    Redirect 301 /projects http://www.newdomain.com


    That is assuming the htaccess file is located in the root of your old domain, and the files are located in www.olddomain.com/projects

    -Ryan
    Signature
    FREE WSO: Protect and Automatically Deliver Your Digital Products

    Ask the Internet Marketing Geek
    <-- Happy to help with technical challenges
    MiniSiteMaker.org <-- Free software to make your mini-sites fast and easy
    {{ DiscussionBoard.errors[2004070].message }}
  • Profile picture of the author thesuccesscoach
    absolute start ryan but thanks to all for their great help (as usual!)
    Signature

    A life and business coach
    Ready to help you make it happen, just ask!

    {{ DiscussionBoard.errors[2005300].message }}
  • Profile picture of the author casius
    Also it depends from your web hosting provider if it has (I hope that it has ) when you can do your redirects in cPanel and directadmin. It is even much easier...
    Signature
    Cloud VPS || Shared Hosting
    Web Hosting Solutions for Geeks!
    HOST1PLUS
    {{ DiscussionBoard.errors[2005748].message }}
    • Profile picture of the author Bellthorpe
      To tell Google to stop indexing the pages, just put them in robots.txt for a while.
      {{ DiscussionBoard.errors[2014059].message }}
      • Profile picture of the author naonline
        I dont want to hijack the thread but I'm having a similar issue.

        I created a wordpress site on my domain and used CPanel to redirect the old static html pages to the new wordpress pages and posts. However google is still indexing the old pages despite a new sitemap being submitted.

        Do I need to add the noarchive tag to the old pages to remove them from the SERPS and get the new pages to show up?

        Thanks

        Nick
        {{ DiscussionBoard.errors[2014231].message }}
    • Profile picture of the author thesuccesscoach
      Fabulous answer thanks so much
      Originally Posted by casius View Post

      Also it depends from your web hosting provider if it has (I hope that it has ) when you can do your redirects in cPanel and directadmin. It is even much easier...
      Signature

      A life and business coach
      Ready to help you make it happen, just ask!

      {{ DiscussionBoard.errors[2034269].message }}
  • Profile picture of the author theIMgeek
    Nick, I believe the process of re-indexing pages is a question of months before old pages are gone.

    Just make sure the old pages redirect with a Code 301 (permanent redirect) and things will get sorted out.

    -Ryan
    Signature
    FREE WSO: Protect and Automatically Deliver Your Digital Products

    Ask the Internet Marketing Geek
    <-- Happy to help with technical challenges
    MiniSiteMaker.org <-- Free software to make your mini-sites fast and easy
    {{ DiscussionBoard.errors[2015520].message }}

Trending Topics