Adding wildcard DNS record |
Article ID: 917 |
Back to Search
|
Question
- I'm looking to configure my website so that anything.mydomain.com will land the visitor on my site (mydomain.com), i.e., bob.mydomain.com or trucks.mydomain.com. How do I do this?
Answer
- For Plesk users:
- For cPanel users:
- Simply add a subdomain like you would any other subdomain in the cPanel interface, except make your subdomain * (as if to show on the screen: *.example.com), and leave the document root field empty... cpanel will automatically populate it with your domain's website root, which will look like this, after you save the change:
| Subdomains |
Root Domain |
Document Root |
Redirection |
Actions |
| * |
.mydomain.com |
/public_html |
not redirected |
Manage Redirection |
Remove |
| othersubdomain |
.mydomain.com |
/public_html/othersubdomain |
not redirected |
Manage Redirection |
Remove |
Note that our example here also shows another subdomain (called "othersubdomain"), which is configured to point to a subfolder... so with this configuration:
- anything.mydomain.com will serve the same content as mydomain.com and www.mydomain.com, the files in /public_html
- othersubdomain.mydomain.com will serve the content that's stored in /public_html/othersubdomain
|
| |
| Downloads Associated With This Article |
| No downloads are currently associated with this article. |