Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can multiple domains point to the same Azure web app?

I'm using Azure for my website and I have 2 domain names that I would like to use for the same site.

For example, I want these 2 domains www.abc.com and www.abc.asia to be the same website (not redirected). Such that www.abc.com/contactus and www.abc.asia/contactus will be the same page.

like image 338
Kaiyan Leong Avatar asked May 04 '17 02:05

Kaiyan Leong


People also ask

Can 2 domains point to the same site?

Pointing two URLs to the same website is a good way to direct traffic to your site from several different domain names. You can accomplish this in two ways: either redirect one of the URLs to your primary domain, or create an alias for one of the URLs. The alias would point that domain towards your primary domain.

Can I point multiple domains to same IP?

Yes, this is an extremely common practice. It is called a Shared Web Hosting: In name-based virtual hosting, also called shared IP hosting, the virtual hosts serve multiple hostnames on a single machine with a single IP address.

Can Azure App Service host multiple sites?

Yes, the setup is very much possible and is a common requirement. You can deploy multiple separate 'WebApps' under an 'App Service Plan'. All those WebApps (/websites) will have their own separate default domain (FQDN) and also you can set custom domain for each of those WebApps.

How many domains can I point to my website?

You absolutely can have multiple domain names, but you don't want them to resolve or be indexed by Google. To prevent that you set up a 301-redirect or “forward” the domain to the “real” domain.


1 Answers

Yes, this is possible (and easy to do). I did the following:

  1. Buy two separate domains.
  2. Configure the DNS A and TXT records of both domains to point to my Azure web app.
  3. On the Custom domains blade, clicked Add hostname to add each domain name.

Both domain names now point to the same Azure web app.

like image 184
Nate Barbettini Avatar answered Oct 25 '22 18:10

Nate Barbettini