Domain Manage

how to 301 a subdomain to main site url ?

Discussion in 'Website Design' started by fish, Sep 5, 2012.

Thread Status:
Not open for further replies.
  1. fish United Kingdom

    fish Well-Known Member

    Joined:
    Nov 2006
    Posts:
    2,725
    Likes Received:
    27
    For some reason (I don't recall setting up this sub domain:confused) on one of my sites I'm finding google has indexed this:

    http://www.blog.xxxxxxxxxx.com/cgi-sys/defaultwebpage.cgi which resolves to a standard Great success! Apache is working page

    there's no sub domain (blog) hosted on my server, & no DNS zone / records set up for it either.

    So how can I 301 it via htaccess to forward to the main site homepage?

    I've tried without success:

    redirect 301 blog.xxxxxxxxxxx.com http://www.xxxxxxxxxx.com


    TIA

    Fish
     
  2. Domain Forum

    Acorn Domains Elite Member

    Joined:
    1999
    Messages:
    Many
    Likes Received:
    Lots
     
  3. redbird United Kingdom

    redbird Well-Known Member

    Joined:
    Sep 2005
    Posts:
    1,123
    Likes Received:
    18
    I'm no expert on htaccess redirects, so I may be wrong but....

    I think you need to set up the subdomain first and then add the redirect to the sudomain htaccess file

    PS EDIT: when you say you don't recall setting the subdomain previously, could it be indexed from previous owner? can you see the Google cache of the page. Or try wayback machine at archive.org
     
    Last edited: Sep 5, 2012
  4. fish United Kingdom

    fish Well-Known Member

    Joined:
    Nov 2006
    Posts:
    2,725
    Likes Received:
    27
    It's been my site all it's life so no previous owner.

    I'll set up the sub domain and try a redirect again.

    Thnks

    Fish

     
Thread Status:
Not open for further replies.

Share This Page