SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2004
    Location
    scotland
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing domain names

    is it possible to change the domain name of a hosting package?

    basically: I set up the site under domain1.com but Ive now been asked to change the domain name to domain2.com.

    I parked domain2.com and now you can access the site via both domain names which is fine but any relative urls within the site still show as domain1.com/whatever.... so after a couple of clicks the address bar is back to displaying domain2.com

    is there a way where I can get domain2.com to show in the address bar and relative urls instead?

  2. #2
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    a bit confusing...

    - is your domain2 now parked or is it not? parked domains are registered domains but you don't have any of your own content on it, it only displays a bunch of related ads.
    - if you're indeed using relative URLs, then when you're on domain2, you should stay on domain2, no matter what. Relative URLs are /services/service1.html as opposed to absolute URLs, which are http://www.domain1.com/services.service1.html

    Basically, you should be able to point both domain names to the same location on the same server. But you should also do a 301 redirect from non-preferred domain to preferred domain name.
    Dan G
    Marketing Strategist & Consultant

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,819
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by c2uk View Post
    - is your domain2 now parked or is it not? parked domains are registered domains but you don't have any of your own content on it, it only displays a bunch of related ads.
    Incorrect. You are thinking of domains parked on an ad service, not domains parked on your own hosting.

    A parked domain displays exactly the same content as the domain it is parked on since both domains point to the same folder.

    The solution to getting domain2 to be the one displayed is to update the .htaccess file in the folder to do a 301 redirect from domain1 to domain2.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    Incorrect. You are thinking of domains parked on an ad service, not domains parked on your own hosting.

    A parked domain displays exactly the same content as the domain it is parked on since both domains point to the same folder.

    The solution to getting domain2 to be the one displayed is to update the .htaccess file in the folder to do a 301 redirect from domain1 to domain2.
    as I said, his post was highly confusing, why would he asked:

    is it possible to change the domain name of a hosting package?
    if domain2 is already there? so, yes I assumed he acquired domain2 at a registrar and parked it there - okay the ad server was wrong, but it's still the same, isn't it?
    Dan G
    Marketing Strategist & Consultant

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2004
    Location
    scotland
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    The solution to getting domain2 to be the one displayed is to update the .htaccess file in the folder to do a 301 redirect from domain1 to domain2.
    Ive never done this before so I'll need to read up on it. Will this work for dynamic query strings?

    do you happen to have a link to a good tutorial for doing this?

    thanks


Bookmarks

Posting Permissions

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