My new site is 'mynewsite.net'. I have a subdomain 'mysub'. In my winhost account I have a directory 'mynewsite'. In that I have the subdomain directory 'mysub', ie from my root winhost directory 'mynewsite/mysub' I can type in my url in the browser 'mynewsite.net/index.html' and everything works fine. BUT when I try to get to the subdomain, it goes nowhere. I type in the url in the browser 'mysub.mynewsite.net/index.html'. What am I doing wrong? <?xml version="1.0"?> <configuration> <location path="index.aspx"> <system.webServer> <httpRedirect enabled="true" destination="index.html" httpResponseStatus="Permanent" /> </system.webServer> </location> <system.webServer> <rewrite> <rules> <rule name="mynewsite.net" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^(www.)?mynewsite.net" /> <add input="{PATH_INFO}" pattern="^/mynewsite/" negate="true" /> </conditions> <action type="Rewrite" url="\mynewsite\{R:0}" /> </rule> <rule name="mysub.mynewsite.net" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^mysub.mynewsite.net?" /> <add input="{PATH_INFO}" pattern="^/mynewsite/mysub/" negate="true" /> </conditions> <action type="Rewrite" url="\mynewsite\mysub\{R:0}" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
Please ensure that your subdomain — mysub.mynewsite.net — is properly configured and pointing to the correct IP address. Verify Subdomain Creation Confirm that the subdomain mysub.mynewsite.net has been created in your hosting control panel. Check DNS Resolution Open your Command Prompt and run the following command: ping mysub.mynewsite.net This will show the IP address your subdomain is currently resolving to. Compare IP Address If the ping results show that the subdomain is not pointing to the IP address of your Winhost site, your domain may be using external DNS services (not managed through Winhost). Update External DNS Records (if applicable) If your DNS is hosted externally, log in to your DNS provider’s control panel and create an A Record for: Hostname: mysub.mynewsite.net Type: A Points to: [IP address of your Winhost site] Find Your DNS Provider If you’re unsure who manages your DNS, you can use a WHOIS lookup service such as who.is to identify your DNS provider.
Thanks for the reply. I purchased the domain through Winhost. 1. I have done Winhost Control Panel > Sites > the domain name > Subdomain Manager However, since this is my SECOND purchase of a domain name from Winhost, it does not appear I can create subdomains on my new website. I can still create subdomains on my old website domain. 2. When I ping mynewsite.net it works. When I ping mysub.mynewsite.net it does not work. 3-5. I purchased this new domain through Winhost, so I believe all of 3-5 should be done in Winhost.
If you registered another domain name in your Winhost control panel, then you will need to set that domain name as the domain pointer for your site. Please see this article for the instructions. Once registered as the domain pointer you should be able to use URL Rewrite to point that domain to a subdirectory.