Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let'say that i've got the domain

I want that when any visitor goes to

the visitor will continue seeing "", but the real address will be "". my application will handle the differences between the addresses. I want that the subdomain can be anything.

The problem is: I'm using a shared host. They allow me to create subdomains and allow me too create some DNS records:

Address (A)
Mail (MX)

There is possible setup my hosting to accept that asterisk/wildcards for subdomains? How I do?

share|improve this question
You should consider the SEO implications of this. – Dave Cheney May 26 '09 at 4:12
What SEO implications? Do the search engines demote listings from wildcarded sites or that aren't www.{domain} ? – Alnitak May 26 '09 at 8:59
If and contain the same information, they will: a) be diluted b) possibly be demoted for "googlebombing" -- setting up multiple identical sites is considered bad form by search engines. A better solution might be to redirect * to – Ben Doom Jul 27 '09 at 18:03
It's not a problem. Just use canonical urls: – Leonard Challis Jun 12 '14 at 8:18
up vote 5 down vote accepted

Try creating an A or CNAME record with * as the subdomain and your server's IP (A record) or domain (CNAME record) as the destination. If your host's control panel doesn't permit a wildcard, you'll have to contact them for help, or move your DNS to a third party.

share|improve this answer

Some advice against wildcard web sites:

What will you do when someone starts publicizing your website as "" and it resolves / renders correctly?

share|improve this answer
Agreed. Just make a single A record for the hostname of the server and then you can make aliases for the websites themselves. Doing this will help you if you ever need to change IP addresses again. – Tatas Jul 25 '09 at 17:33
The use case for this is usually for things like in web applications - highly useful, and a nightmare to set up manually on a DNS server if you've lots of signups. If someone publicises, you can always set up a spurious A record for that particular subdomain. – ceejayoz Dec 17 '09 at 22:15
Or in your Web server software, where I assume you would alias to the xyz site, have any unmatched queries (still pointing at the same server) use a normal redirect, so the browser changes to or You could even throw in a 404 page at the end of the redirect. – mpbloch Apr 12 '10 at 0:30
Having a wildcard DNS does not mean that the webserver delivers a website for each possible name. The webserver has to be configured seperately. For example it would be possible to configure a webserver so it delivers only but not anything else. – mit Apr 22 '15 at 10:02

A Bind DNS server allows you to create wildcard A records like this:

* IN A x.x.x.x

Or, if they are using a web control panel, create an A record for the host * , at your IP address.

Windows 2000 DNS server takes some effort to use wildcarding:

Step 1. Enable LooseWildcarding. Loose Wildcarding

Step 2. Use Dnscmd to create the Wildcard record.;en-us;840687

I'm not sure about Server 2003 and newer - there was an issue with wildcards in Server 2003 DNS not working if you have WINS forward lookup enabled

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.