Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

Some advice really appreciated

Joined
Jun 16, 2007
Posts
3,279
Reaction score
252
Long time no post, been a long while since I made a post on here (I only just realised I joined this forum 15 years ago next month too :eek:) but I do lurk from time to time and it’s good to see some of the old timers still active.

I am looking for some idiot proof advice on wildcard domains and an idiots guide explaining to me how to achieve the following.

Basically I have a domain name registered at 123-reg with my nameservers pointing to Fasthosts hosting (that’s where my site is hosted)

Can someone please explain to me how to achieve a ‘catch all traffic’ for anyone visiting a web address which doesn’t exist, and for that visitor to be redirected to the main homepage for anything that is typed in the form of a sub domain.

eg If xxxxxx.mydomain.co.uk or anything was typed which didn’t exist, the visitor would be sent to the home page of mydomain.co.uk

I have read about wildcard domains and setting up a dns entry with an A type entry of * and pointing that to an IP address, however everything I have tried doesn’t work.

Any advice on this would be truly appreciated as it is driving me mad, and I’m unsure if it’s an actual issue between having the domain registered one place and hosted at another place, or if I am doing something wrong.

Thank you :)
 
Don’t have experience of doing that - but I would take a look at cloudflare - you might be able to achieve that with a free account…
 
Hi Frank

I might be talking out of my backside but I think it's probably not possible on places like Fasthosts unless you have a dedicated server. With shared IPs you would need to list all catchall instances as host headers. I have done something similar using own DNS service and dedicated server. You can then use htaccess or equivalent to redirect to main homepage.

I hope it helps ..
 
You've already solved half of the problem – the DNS side.
If your DNS manager allows you to use wildcard (not all do) then that will catch all subdomains.
The seconds half of that problem is to point them to server IP that knows what to do with that and, as Mo suggested, you won't be able to do that on a shared hosting account. You would need to have control over the default vhost of that server/vps.
I haven't tried this myself but you might be able to use a CNAME record instead of an A record,so have:
*.example.co.uk 86400 CNAME example.co.uk
If that works you would need to deploy some .htaccess redirects
 

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Featured Services

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Be a Squirrel
Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom