I need to serve any of my subdomains
sub1.foo.com
sub2.foo.com
anysub.foo.com
from foo.com
I have successfully added a A
record with the *
value in WebsitePanel.
Should i make an edit at web.config in my project to enable this feature also?
If i visit for example anysub.foo.com
i get the error message
The connection to anysub.foo.com was interrupted.
which i suppose means that something is blocking the response.
How can i fix that? Should i edit the web.config somehow or what?
UPDATE
The site hosted in a shared hosting environment
A wildcard subdomain is particularly useful if you desire subdomains to display whatever you set as the document root (a designated folder that stores web pages.) Typically, most wildcards are set to the site's homepage out of preference. This should be specified when creating the wildcard subdomain.
A wildcard DNS record is specified by using a "*" as the part of a domain name, e.g., *. example.com. NOTE: A wildcard DNS record does not cover a root domain (e.g. yourdomain. tld), thus you will need to create a record for @ host additionally.
A wildcard DNS record is a record that answers DNS requests for any subdomain you haven't already defined. You can create wildcard A records and CNAME records by entering an asterisk (*) in the Host field when creating a DNS record.
Unfortunately, it is not possible to bind wildcard hosts with IIS on a shared hosting environment. You need to have a dedicated machine with a dedicated IP that handles all incoming traffic, without being bound to a specific domain (i.e. default IIS website handling all incoming traffic).
AFAIK, this feature is not supported in IIS even in version 8.5.
On the DNS side, make sure it's set as a CNAME * pointing to @.
If your website is hosted at WebsitePanel you probably need to use the "Add Web Site Pointer" to make the A record know which Website to use.
(You might also need to remove the previously created A record.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With