• Welcome to AcornDomains.co.uk, a friendly community for UK domain investors, developers and anyone interested in domain names.

    Whether you're looking to buy or sell domains, learn more about the UK domain market, get feedback on your names, or simply chat with other domainers, you're in the right place. AcornDomains has been bringing together people from across the UK domain industry for many years, from complete beginners to experienced investors.

    Have a look around, join the discussions and, if you haven't already, create a free account and introduce yourself.

how to 301 a subdomain to main site url ?

Status
Not open for further replies.
Joined
Nov 25, 2006
Posts
2,686
Reaction score
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
 
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:
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

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
 
Status
Not open for further replies.
Top Bottom