can't get my web site, on IIS, to work with URL beginning with www - asp.net

I added my vb.net web app to IIS 8 on my Azure Windows 2012 server R2 VM.
Then, I did IIS > right-click Sites > Add Web Site
and set "Site name" to my_site.org
and set Physical path to project directory for my web site
and set "Host name" also to my_site.org.
Works great. From Internet, I browse to http://my_site.org and it runs OK.
Now I want people to also browse to www.my_site.org
but when I Add Web Site, just like above, but for www.my_site.org
it adds ok, but when I select www.my_site.org and click IIS Browse www.my_site.org browser pops up but reads "webpage cannot be found"
Nor can I browse it from Internet.

Because what is WWW? essentially that is a subdomain that you would need WWW to exist for it to load WWW.
Best option may be to set up domain forwarding to WWW, maybe a CNAME in your domain options?

From Azure documentation, "You must also provide the domain or subdomain alias for the CNAME, such as www if you want to create an alias for www.customdomain.com. If you want to create an alias for the root domain, it may be listed as the '#' symbol in your registrar's DNS tools."
More at:
https://azure.microsoft.com/en-us/documentation/articles/cloud-services-custom-domain-name/
Hope this helps! :)
Shahed

Related

How to Upload website over internet by using IIS and domain

Please Explain me step by Step, how to host a website over internet. by using iis server with help of domain
To host asp.net site in iis you could follow the below steps:
1)open the visual studio. Select your site and right-click on that-> Click publish.
2) in pick up publish target Select folder option and create choose destination where you want to publish the site. (make a new folder and publish a site in that folder) and then select publish.
3)open IIS manager(if not installed then installed it first).
4)expand the server name and right-click on sites and select add a new site.
5)enter the site name, physical path, and site binding details.
(Note: you need to have a public IP first, and bind the domain to the IP at where you purchased the domain name. after that, in IIS, bind IP and hostname as usual)
6) click ok.
if you have url rewrite rule and other external settings in your site you need to install that external module in iis.
for more detail please check the below link:
https://learn.microsoft.com/en-us/iis/install/installing-iis-7/installing-iis-7-and-above-on-windows-server-2008-or-windows-server-2008-r2

Typo3: How to handle multi-domain in a development environment

I have a website with multiple domains (each domain has its own tree). On the live server everything is fine, but when I develop on localhost I have a problem:
I cannot (pre)view any pages from the other domain leafs.
Website1
www.domain1.com
localhost
Website2
www.domain2.com
The above domain records allow me to view all pages of Website1 - but when I want to see a page from Website2, I am redirected to www.domain2.com
e.g. //localhost/?id=100 redirects to //www.domain2.com/?id=100 which results in a 404 of course, because the page is not part of Website1 tree.
I am not able to enter localhost as a domain record for BOTH website roots.
Of course I could install virtual hosts on my local server, but this seems not convenient - I hope there is better solution.
EDIT:
When I add the language id to my URL, it works:
//localhost/?id=100&L=0
:-o
Localhost says to me: you have a local copy of the Website.
If so: disable all domain records, add
config.baseURL >
config.absPrefix >
To your root settings. I guess one or both of them are set.
Christian

configuring asp.net website on iis on windows 7

I have website and I configured it on IIS. I did not supply any ip and let the default be stayed "All unassigned".
When I browse the site from IIS manager it's give error in browser that "The resource cannot be found" and the url is 'loclhost/MAIN.aspx"
My application name is rentalone but the url does not include the app name. It just gives the page name and localhost.
What am I doing wrong.
Please help
thanks
Go into IIS, expand the tree in the left side, you should see a Default Web Site eventually in the tree. Right click that and select Add Application, it will ask you for a Name and location, location is there you application files are and Name whatever you like. When that is done, you can go to http://localhost/MyAppName/main.aspx
MyAppName being the name you provided it

IIS 7.5 URL rewrite based on domain name

I'm currently using IIS 7.5 to both host ASP pages and as a bridge to a tomcat server setup to host JasperReports. I've been trying to figure out how to host both of these services with 1 IP and one IIS server.
What it should do
1) When the account managers visit admin.mycompany.com, I'd like to display the ASP pages in IIS. under the domain admin.mycompany.com
2) When the account managers visits reports.mycompany.com, IIS should act as a bridge to the tomcat server and display the tomcat pages under reports.mycompany.com
Restrictions
1) Our hosting provider refuses to give us a 2nd IP, and
2) I'd prefer not to install Apache, which can easily do this with virtual host.
This question can be resolve with https://serverfault.com/questions/47537/can-iis-be-configure-to-forward-request-to-another-web-server
I copied vdboor's answer here for reference:
For IIS 7.5, Microsoft provides official modules for this!
URL Rewrite: http://www.iis.net/download/URLRewrite
Reverse proxy: http://www.iis.net/download/ApplicationRequestRouting
In the site settings, you'll get an "URL Rewrite" icon.
Open it
right click on the "inbound rules list"
Select "Add Rule(s)"
Choose "Reverse proxy"
In this dialog you can enter the hostname + port to forward to. After adding the rule, opening the edit dialog offers more customizations.
the reverse proxy template is not available at the server level.
- so you need to go to the site level, and then click the 'URL rewrite' icon to be able to use this template.
http://forums.iis.net/t/1183318.aspx

Bindings in IIS7 when creating a subdomain

I have a domain www.foo.com purchase with NameCheap.
I pointed that domain name to my VPS's static IP address and created a web application in IIS7 and it's working correctly.
Now I created another separate web application and set it's binding to forums.foo.com.
However the browsers doesn't enter the site and it seems the binding isn't doing quite what I expect it to do.
In Firefox, I get:
Server not found
Firefox can't find the server at forums.foo.com.
Is there some sort of special configuration I have to do in order for the subdomain to correctly point to my folder in inetpub?
Don't you have to configure the subdomain with namecheap first?
Who is serving dns for the subdomain?

Resources