1and1 (Shared Hosting) Wildcard Subdomain

On a whim, I decided to try to set up a wildcard subdomain for one of the domains I have hosted with 1and1. (I already have a PHP based site that allows me to access a specific subpage using a URL like mydomain.com/index.php?page=<name>. I've used a RewriteRule to allow the shortcut mydomain.com/<name>, but I thought it would be nice to have <name>.mydomain.com work instead...)

I didn't think it would work, but their Control Panel allowed me to create a subdomain called "*".

It took longer than normal to apply, but once it did, <anything>.mydomain.com started resolving.

Unfortunately, the page it returns is not the correct one. In fact, it's not even _my_ page! When I go to <anything>.mydomain.com, I get their standard "Just registered" page, but I've checked all my space on their servers and I don't have that page anymore! (I have no way of knowing what directory my subdomain resolves to, but it's certainly not a directory I control.) This is despite my setting the destination of *.mydomain.com to one of my directories with their Control Panel.

It seems like their DNS server is working correctly, because <anything>.mydomain.com resolves to the same IP as mydomain.com. When I visit that IP in a browser, I don't get my page (because it's shared hosting), I get the same page I get when I visit <anything>.mydomain.com. It seems like the DNS server is working right, but something about their webserver is returning the wrong page.

So, it seems to me that basically 1and1 just doesn't support wildcard subdomains, and it's an error that their Control Panel allowed me to make one. Can anyone confirm this, or is it possible that I've just missed something?

FWIW, I contacted 1and1 Tech Support. Their answer was surprisingly quick, but utterly useless. Just for fun, here it is:

1and1 (Shared Hosting) Wildcard Subdomain Originally Posted by Tech Support
We apologize for the inconvenience.Unfortunately, we dont support wildcard domains.
Sheesh. I hope not! What about wildcard subdomains though, like I asked? 1and1 (Shared Hosting) Wildcard Subdomain

1and1 (Shared Hosting) Wildcard Subdomain Originally Posted by Tech Support
Now, regarding creating sub domains, our contorl panel only never allow characters like the " * ", except for dash(-) and underscore( _ ).
("Only never"? "contorl panel"?)

Anyway, this is wrong because their "contorl" panel did let me make the subdomain "*".

1and1 (Shared Hosting) Wildcard Subdomain Originally Posted by Tech Support
Furthermore, we checked the subdomain you created that you said was working here in our tools, but we found an error 401.
Well gee! I wonder if that's because you cancelled the authentication box that came up. Their Tech Support ppl don't know what a 401 is? The point was that I gave them 2 examples of URLs that should have pointed to the same page, but one of them goes to someone else's page.

 

 

 

 

Top