Domain Forwarding question

Discussion in 'Web Design and Development' started by dbernie41, Jun 3, 2008.

  1. dbernie41 macrumors regular

    Joined:
    Nov 14, 2007
    Location:
    Ohio
    #1
    So I have a website (domain and hosting) that I am going to be developing. There is a similiar domain name that I have decided to purchase and I want it it to automatically re-direct to the first site. Is this something I set up when I purchase the 2nd domain or where do I take care of this?
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    The specific way you do it generally depends on your domain registrar, but it's generally done through them. Just have it point to the correct IP.
     
  3. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #3
    If the web host there says its up to you, and you happen to be running a VPS, there is a setup in most control panels called Domain Forwarding, and it's very straight forward. If it happens to be Apache, you can also simply turn on the rewrite engine and create a .htaccess in your document root as follows:

    Just thought I'd cover the manual ways of doing this, short of adding in meta-refresh or javascript redirects which aren't as efficient. With the .htaccess method you can also change the rewrite condition to use regular expression matches to forward specific URL's and/or keep arguments intact between both domains, hence the advantage.

    -jim
     
  4. watcherFR macrumors newbie

    Joined:
    Jun 12, 2008
    #4
    Don't have 2 domains with the same content

    You really shouldn't allow the same content to be displayed on different domains. It will hurt your search rankings, you must do an HTTP redirect to the domain you want really to be used.
     
  5. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #5
    None of the suggestions thus far involve mirroring or copying content between two sites. The solutions suggested simply redirect as you noted.

    -jim
     
  6. CanadaRAM macrumors G5

    CanadaRAM

    Joined:
    Oct 11, 2004
    Location:
    On the Left Coast - Victoria BC Canada
  7. watcherFR macrumors newbie

    Joined:
    Jun 12, 2008
    #7
    Jim, your solution indeed provides a redirect to the single URL serving the site hence changing the URL in the browser if is not *that* URL. So all is well.

    However, just pointing the "A" entry for both domains to the same IP could serve the same content with two different URLs if you are not using virtual hosting (or doing it cleverly). Hence my reply.
     
  8. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #8
    Some people run their own nameservers and VPS's which allow virtual name hosting on the same machine. I happen to be one of those people. But I agree completely with what you noted, btw. I don't recall anyone mentioning A records, but it is Friday, I'm tired and apologize if I misunderstood ya in any way!

    -jim
     
  9. watcherFR macrumors newbie

    Joined:
    Jun 12, 2008
    #9
    I run multiple sites on the same server too :)

    So we're both saying the same thing, just a little misunderstanding.
    My remark was building upon angelwatt's answer. He said to just point the domain to the same IP. I wanted to make it clear that doing so is a lot better using redirections as you mentionned.

    Cheers!
     
  10. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #10
    Thanks for clarifying for me, I am tracking now.

    -jim
     

Share This Page