Changing URLs from http:// to http://www

Discussion in 'Search Engine Optimization' started by customtee, Jan 5, 2010.

  1. #1
    I set my Wordpress blog over two years ago as http://domain and all of my pages are indexed that way (1000+ posts, 2500+ tag pages and others etc). I need to make it at http://www. to match the newly launched site on the same domain because of SSL and other reasons. How can I make this change without
    1. Ruining outside links to current posts/urls
    2. Losing traffic from the change
    3. Impacting rankings or anything I haven't thought of.
     
    customtee, Jan 5, 2010 IP
  2. Canonical

    Canonical Well-Known Member

    Messages:
    2,223
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    110
    #2
    The following code in your .htaccess file in the root folder of your web should do the trick:

    Of course, you'll want to make sure that WordPress is also set w/ www as the preferred domain (and in Google Webmaster Tools if you use it). You don't want Mod_Rewrite to redirect from non-www to www only to have WordPress redirecting it back from www to non-www. Redirect loops are teh suck!

    PS: If you are adding SSL to your site then I would suggest that for all web pages to be accessed via HTTPS that you either:

    1) Isolate all pages to be accessed via HTTPS to a particular folder like yourdomain.com/secure/ OR
    2) Isolate all pages to be accessed to a particular subdomain like secure.yourdomain.com

    This will allow you to VERY easily prevent URL canonicalization issues using .htaccess. You don't want your HTTP pages indexed also as HTTPS and visa versa. Thinking about this now will save you many headaches later.
     
    Last edited: Jan 5, 2010
    Canonical, Jan 5, 2010 IP
  3. customtee

    customtee Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the response. To clarify you are suggesting:

    1. Add the code to the htaccess. The code you mentioned below doesn't address directly the one directory (blog) or specific links?
    1. Change wordpress address from / to www.
    2. Change the preferred url to www in Google Webmaster tools.

    Note: The https is only for the admin login pages.

    So doing above won't impact my links or SE rankings?
     
    customtee, Jan 5, 2010 IP
  4. Ascendancy

    Ascendancy Active Member

    Messages:
    1,721
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    90
    #4
    It won't lower your rankings or anything, as all traffic coming in from without the www subdomain will just redirect to the www subdomain. This is actually good, as you'll solidify one URL for your site. A lot of websites will have backlinks to their site as both (ie: http://digg.com/ and http://www.digg.com/). If you want your site to specifically use or not use the www subdomain, it's best to set it up in your .htaccess and redirect to only one or the other
     
    Ascendancy, Jan 5, 2010 IP