Wildcard subdomains are useful to allow end users of a domain-based multisite network to create new sites on demand. In this type of network each new site has its own subdomain, and the wildcard configuration means that those subdomains do not have to be configured individually.
Questions tagged [wildcard-subdomain]
456 questions
168
votes
3 answers
Wildcard SSL on sub-subdomain
We have a wildcard SSL certificate for *.domain.example, and have a website with sub1.sub2.domain.example.
Safari 4.0.4 on macOS pops up a certificate error(presumably because of wildcard interpretation), while Safari 4 on Windows does not.
Also IE8…

porto alet
- 1,895
- 2
- 14
- 16
85
votes
3 answers
Virtualhost For Wildcard Subdomain and Static Subdomain
I have an odd situation where I want to have the URLs app1.example.com, example.com and *.example.com all using a different virtual host. This is what I have (excluding example.com because it just makes it messier).
ServerName…

Dave
- 1,658
- 3
- 17
- 19
68
votes
4 answers
Should I use an A record or a CNAME for a wildcard subdomain?
Some people are saying use an A record and others a CNAME for a catch all subdomain.
Which should I use and why?

Igor K
- 1,261
- 3
- 13
- 19
62
votes
1 answer
Single SSL cert on multiple servers
For a project I'm working on I will have multiple servers and lots of subdomains (eg- *.mydomain.example). I'm thinking of getting this SSL cert from godaddy- Unlimited Subdomains (Wildcard) $199.99/yr
Will I be able to use the cert on all the…
razor
53
votes
17 answers
Public Wildcard Domain Name To Resolve To 127.0.0.1
Is anyone aware of a public wildcard domain name that resolves to IP address 127.0.0.1. For example if I wanted to test a URL locally such as mywebsite.localhost.com or example.localhost.com but I don't have control of DNS settings (hosts file or…
user189422
39
votes
2 answers
Dynamic Subdomain Handling in a Web App (Flask)
I'm going to be using flask to create a web application, and part of the application will involve a subdomain (for example, user1.appname.org).
I'm not sure how to go about creating these subdomains dynamically in the flask configuration, or how to…

Bruce Collie
- 501
- 1
- 5
- 4
33
votes
5 answers
Route traffic to a docker container based on subdomain
I have wildcard dns pointed to my server e.g. *.domain.com
I'd like to route each subdomain to it's own docker container.
So that box1.domain.com goes to the appropriate docker container.
This should work for any traffic primarily HTTP and SSH.
Or…

Adam Jimenez
- 3,085
- 3
- 35
- 32
32
votes
3 answers
Apache rewrite based on subdomain
I'm trying to redirect requests for a wildcard domain to a sub-directory.
ie. something.blah.example.com --> blah.example.com/something
I don't know how to get the subdomain name to use in the rewrite rule.
Final Solution:
RewriteCond %{HTTP_HOST}…

Sam
- 5,416
- 7
- 47
- 49
28
votes
1 answer
Can I use a wildcard subdomain with my custom domain?
Just checking to see if anyone knows if this is possible yet. I would like to use a wildcard subdomain with firebase hosting and use functions to parse the subdomain.

Gilberg
- 2,514
- 4
- 31
- 41
27
votes
3 answers
redirect all subdomains from http to https
I redirect all http requests for my subdomain to https by using following code.
ServerName subdomain.example.com
Redirect 302 / https://subdomain.example.com
Now my problem is how do I do it for all…

Super Engineer
- 1,966
- 1
- 13
- 21
26
votes
3 answers
Wildcard for second level subdomain
AWS Certificate manager isn't allowing me to add a 2 level wildcard domain name, which would match x.a.example.com, y.b.example.com etc.
Is there a workaround for this? (instead of creating *.a.example.com, *.b.example.com etc)

Avery235
- 4,756
- 12
- 49
- 83
21
votes
1 answer
Self-signed certificate: DNSName components must begin with a letter
Is there a way for java's keytool to generate self-signed certificate with a wildcard in SAN (Subject Alternative Name)? I'm using this command to generate keystore:
keytool -genkey -alias tomcat -storetype JKS -keyalg RSA -keysize 2048 -ext…

zkristic
- 629
- 1
- 9
- 24
20
votes
8 answers
Wildcard Subdomains
I know there have been a few threads on this before, but I have tried absolutely everything suggested (that I could find) and nothing has worked for me thus far...
With that in mind, here is what I'm trying to do:
First, I want to allow users to…

beaudeal
- 203
- 1
- 3
- 7
18
votes
4 answers
Android HttpClient - hostname in certificate didn't match != <*.example.com>
I'm using HttpClient on Android to connect to https://someUrl.com/somePath. The problem is that the site's certificate is for *.someUrl.com, not someUrl.com, so I get an SSLException. Lame on the part of the site, yes, but unless I can get it fixed,…

noah
- 21,289
- 17
- 64
- 88
18
votes
1 answer
%N backreference inside RewriteCond
I'm working on a virtual domain system. I have a wildcard DNS set up as *.loc, and I'm trying to work on my .htaccess file. The following code works:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?example\.loc$ [NC]
RewriteCond %{REQUEST_URI}…

Connor Deckers
- 2,447
- 4
- 26
- 45