1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

DNS Redirect

Discussion in 'Apache' started by pk_synths, Mar 25, 2004.

  1. #1
    I posted this on SEOChat but hopeing someone can help me out with this one.

    I have a subdomain that mirrors my domain name and I need to be able to 301 redirect it site wide for Google. Meaning Google will come into the subdomain and be redirected to the domain with the same exact URL attached.

    Redirect:

    sub.domain.com/aboutus/links.html

    to

    www.domain.com/aboutus/links

    I know 301 can do this on a page by page basis but I have 30000 pages so that would take too long or it can redirect the entire subdomain to the main domain's homepage but I dont want to do this because I want the weight to be passed to the right pages. I'm trying to remove this sub domain entirely but safely for Google because most pages rank well in Google and I dont want to loose this.

    Any help would be appreciated. Thanks
     
    pk_synths, Mar 25, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Funny thing... it was the first thread I made within this section.... ;)

    Check it out here...

    - Shawn
     
    digitalpoint, Mar 25, 2004 IP
  3. pk_synths

    pk_synths Peon

    Messages:
    83
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Opps. Cool and will this keep the URL intact??? This isn't a redirect to just the homepage is it???

    So:

    sub.domain.com/links.html

    qill redirect to:

    www.domain.com/links.html

    right??

    You can also redirect domain.com to www.domain.com with that correct?

    Thanks alot
     
    pk_synths, Mar 25, 2004 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    digitalpoint, Mar 25, 2004 IP
  5. pk_synths

    pk_synths Peon

    Messages:
    83
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Awesome thanks again :)
     
    pk_synths, Mar 25, 2004 IP
  6. compar

    compar Peon

    Messages:
    2,705
    Likes Received:
    169
    Best Answers:
    0
    Trophy Points:
    0
    #6
    All we do on our FreeBSD servers for this type of thing is setup a symbolic link. For every domain we host in the form www.yourdomain.com we setup a symbolic link to it in the form yourdomain.com==>www.yourdomain.com.

    I've asked my technicians about all the other methods and they can never see any reason for implementing them, because our method seem to work perfectly.

    The command from a root prompt to setup the link is: ln -s www.yourdomain.com yourdomain.com
     
    compar, Mar 25, 2004 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #7
    Doesn't that setup give you domains with duplicate content? (or is that the point?)

    - Shawn
     
    digitalpoint, Mar 25, 2004 IP
  8. compar

    compar Peon

    Messages:
    2,705
    Likes Received:
    169
    Best Answers:
    0
    Trophy Points:
    0
    #8
    No. The non "www" version is simply acts as an alias for the "www" version.There is only one set of data on the hard drive and that is in the "www.compar.com" directory. Here is the listing from the server: "lrwxr-xr-x 1 root www 14 Aug 21 2002 compar.com -> www.compar.com".

    To try it access my site using www.compar.com and then access it using compar.com.

    Shawn you asked "Doesn't that setup give you domains with duplicate content?" I suspect you really mean URLs with the same content and to that extent I guess it does. The trick is to never have any links go to "compar.com".

    But if someone tries to find your page without typing the "www" it will take them to the site and that is the real point is it not?
     
    compar, Mar 26, 2004 IP
  9. pk_synths

    pk_synths Peon

    Messages:
    83
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Actually no. The point is that if someone types in or links to "domain.com" they get redirected (safely) to www.domain.com. This keeps all your backlinks in one domain. Keeps your search engine listings with one domain name. Also if you have a sub domain you want to get rid of a user will be redirected to www.domain.com and Google will reindex it as such.
     
    pk_synths, Mar 26, 2004 IP
  10. theblade24

    theblade24 Active Member

    Messages:
    84
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    73
    #10
    Ok, lets say I want to do this with zhdbdtd.com and want to make it
    www.zhdbdtd.com

    I've tried this and works great...except.....when my site changes to
    https it tries to revert back to the zhdbdtd.com and not use the www, but it cant, so it never becomes secure.

    Is there a way to do this but exclude https calls so it stays using the www?

    Also, can your suggestion be used in .htaccess instead of conf?
     
    theblade24, Mar 26, 2004 IP
  11. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #11
    digitalpoint, Mar 26, 2004 IP