: In GoDaddy hosting how can all wildcard domains point to the same directory? I want to create wildcard sub domains and all should point the same main domain's directory. And I read some articles
I want to create wildcard sub domains and all should point the same main domain's directory. And I read some articles and made this,
*.example.com
Now, if I type any sub domain it shows pageok. Now, how to make all the sub domains to point the same main domain. ?
More posts by @Kimberly868
2 Comments
Sorted by latest first Latest Oldest Best
You need to set the ServerAlias in the configuration file. I am guessing you have CPanel.
Maybe you can search the docs for ServerAlias. Sorry I don't use CPanel.
ServerAlias *.mydomain.com
I use this all the time for testing and live hosting. My PHP code handles the sub domain content.
Using the DNS records below, both the root domain and all subdomains will resolve to 10.0.0.1
example.com. 1800 IN A 10.0.0.1
*.example.com. 1800 IN CNAME www example.com. 1800 IN CNAME example.com.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.