How do i connect my windows azure website with my domain name perfectly? - .htaccess

I did almost everything that have described in the azure documentation briefly.
My domain names that i need to be assigned with my azure website url idaa.azurewebsites.net are mostout.com and www.mostout.com.
When trying to enter my site using any of the links added here, the site loads and works perfectly as i need.
But the problem is with my url which is getting loaded in browser url field while giving mostout.com or www.mostout.com.
It comes with the azure website url every time. What do I do now to get it working?

Make sure to set the CNAME for your service: have the www. name point to the full azurewebsites.net address.
Note that you'll:
need to have a level of service that supports custom domains with Windows Azure Web Sites,
add the CNAME from your www. domain to the azurewebsites domain (same goes for having the naked domain name via an A record or similar)
add the verification names, awverify.www.yourdomain.com and awverify.yourdomain.com
use the Manage Domains function in the portal for the web site to customize that domain name,
Things should just work then.

Related

Redirect www to non-www on Azure Dns Zone

I have created Azure DNS Zone to manage redirections which use domain from namecheap.
Let's assume that my website is www.johndoe.com and currently website working well for johndoe.com but when I call www.johndoe.com it doesn't work well.
I have CNAME record and in CNAME redirect to redirect but unfortunately it doesn't work.
When I have call www.johndoe.com response message is as following...
Our services aren't available right now
We're working to restore all services as soon as possible. Please check back soon.
Please take into account that DNS does not provide a redirect.
An additional A or CNAME record only provides your IP address to people that navigate to that specific URL. When www.johndoe.com and johndoe.com both resolve to your web server, this means each page on your site has two addresses. This is horrible for things like SEO.
For a true redirect (and a 301 is preferred for SEO), set something up in the service that's handling the traffic coming in.
For instance: if you have an App Service running ASP.NET, setup the redirect in web.config. If you have Front Door (or a CDN) in place, use the rules engine to create a redirect with the correct condition and action.
Here's an example redirect in an Azure Front Door Classic Resource (this one redirects the other way):

Azure URL is not working for the new CNAME entry

Recently we have created a new CNAME entry for the internal react website which is deployed in Azure. It has been pointed to traffic manager since we are deploying in two regions. After the CNAME entry is create, the URL throws 404 error. We have already configured the entry access restriction to all internal users. Appreciate if anyone can help to identify the issue.
For the error, you could add the new CNAME subdomain to your app service---custom domains---add custom domain as the picture displaying steps 1-5. After you validate the subdomain and add the subdomain into the custom domains, you should access the subdomain URL via the traffic manager. Read this blog for more details.
In addition, only Web Apps at the Standard SKU or above are eligible for use with Traffic Manager. Attempts to add a Web App of a lower SKU fail. Read Azure web apps as the endpoints.

Unable to access CDN endpoint via custom subdomain

my team and I are currently exploring using Azure static site blobs and CDN endpoints to host several web apps.
We have successfully deployed our static files to the blog storage and our entire test app loads on both the primary (name.abc.web.core.windows.net) and CDN (name.azureedge.net) endpoints. When it comes to mapping a custom subdomain via the “cdnverify” temporary step, however, I am unsuccessful.
I have very carefully followed and quintuple-checked all steps in the support doc "Tutorial: Add a custom domain to your Azure CDN endpoint" (here).
This is my current DNS config (via Namecheap).
When I skip the cdnverify step, e.g. assign the azureedge CNAME value directly to a host called “v2”, and add that as a custom domain in my Azure portal CDN blade, the subdomain begins loading the CDN endpoint and can even have a CDN-managed HTTPS cert deployed with no manual verification. A dig command to this host (v2.ourdomain.org) finds an expected response (view here).
Here's the rub, though. If I assign a CNAME host of “cdnverify.static” to “cdnverify.name.azureedge.net.” and add it as a custom domain in the portal’s CDN blade, however, this secondary subdomain never loads our endpoint, and cannot deploy an HTTPS cert. The Azure portal verified this host when added to the endpoint and a dig command to “cdnverify.static.ourdomain.org” shows this answer, which looks good.
A dig command to “static.ourdomain.org” returns no answer and a ping command says “unknown host”. This is expected since I’ve not created such a record yet, and so I am wondering how we’re meant to ensure this subdomain is verified as per the “Verify the custom domain” section in the above-mentioned doc.
It’s very important for us that the cdnverify host works and can be assigned a certificate before we permanently re-locate our domains as these apps are already in production. At this point, I am at a loss over what to try next. If possible, I’d love to know what step(s) I am missing, or what can further be done to diagnose the issue.
Many thanks to anybody who might have some advice!
The cdnverify subdomain is to create a temporary CNAME mapping to avoid interruption of web traffic. With this method, users can access your domain without interruption while the DNS mapping occurs. If you have not any existing web app work, you can skip the cdnverify step.
From your description, "a dig command to cdnverify.static.ourdomain.org shows this answer, which looks good." It indicates that the cdnverify host works and you have verified that. You just need to associate the custom domain with your CDN endpoint.
In this step, you enter your custom domain like static.ourdomain.org, including the subdomain. Do not use the cdnverify subdomain name.
After you have added the custom domain static.ourdomain.org successfully in the CDN endpoint.
At this point, your custom domain has been verified by Azure, but
traffic to your domain is not yet being routed to your CDN endpoint.
After waiting long enough to allow the custom domain settings to
propagate to the CDN edge nodes (90 minutes for Azure CDN from
Verizon, 1-2 minutes for Azure CDN from Akamai), return to your DNS
registrar's web site and create another CNAME record that maps your
subdomain to your CDN endpoint. For example, specify the subdomain as
www or cdn, and the hostname as .azureedge.net. With
this step, the registration of your custom domain is complete.
After you have completed the registration of your custom domain, verify that custom domain references your CDN endpoint.
Finally, you could freely remove the cdnverify CNAME record in your domain provider as it was necessary only as an intermediary step..
Ref: https://github.com/uglide/azure-content/blob/master/articles/cdn/cdn-map-content-to-custom-domain.md#how-to-map-custom-domain-to-content-delivery-network-cdn-endpoint

Add custom domain to Azure web app without validation

I am on a project that is re-platforming a site from a web server to an Azure PaaS web app, in addition the site will have all new content and in some cases new URLs. We have some redirects in place to handle the mapping of old URL's to new ones. I would like to test that these redirects work correctly on my new azure web app. Normally I would update my hosts file to point at the new server, add an IIS binding so the correct website picks it up and go from there. However I don't seem to be able to bind a new hostname ("custom domain") without verifying that I own the new host name. It will just be my internal DNS that I will be altering to re-route my requests. Does anyone know how to add a custom domain in the azure web apps without validating? This doesn't sound like a big ask to me.
Thanks
Will
You can't do it without any verification, but you can do it without pointing traffic away from your existing site to your new site.
To verify you own the domain without redirecting traffic to it yet, create a DNS record called a TXT record with your domain registrar.
the "TXT host" should be
awverify.mysubdomain.mydomain.com
or
awverify.mydomain.com
The "value" should be
myapp.azurewebsites.net
just replace "mysubdomain" and "mydomain" and "myapp" with your specific info.
After you do this, the verification should succeed and you can add the custom hostname.
Here is more info about this: https://learn.microsoft.com/en-us/azure/app-service/manage-custom-dns-migrate-domain
You can use either a CNAME record or an A record to map a custom DNS name to App Service.
We recommend that you use a CNAME for all custom DNS names except a root domain.
If you missed a step or made a typo somewhere earlier, you see a verification error at the bottom of the page.
If you will use A record, you can create a TXT record to map to the app's default hostname .azurewebsites.net. App Service uses this record only at configuration time, to verify that you own the custom domain. After your custom domain is validated and configured in App Service, you can delete this TXT record.
Reference: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain.

Configuring Google Domain to point to Azure website

I have an site hosted on Azure that I am trying to point a domain from Google Domains to.
My current configuration is as follows:
Name Type Data
# A XXX.XXX.XXX.XXX
www CNAME history-podcasts.azurewebsites.net
awverify CNAME awverify.history-podcasts.com
I am following the instructions from here: Configuring a custom domain name for an Azure Website.
When I go to the Azure portal to Manage Domain and attempt to enter the url in DOMAIN NAMES, I get the following message:
A CNAME record pointing from history-podcasts.com to history-podcasts.azurewebsites.net was not found. Alternative record awverify.history-podcasts.com to awverify.history-podcasts.azurewebsites.net was not found either
When I go to the URL for the domain, I get the following message:
The website you have attempted to reach is not available in this Microsoft Azure Web Sites region. This could be due to one of several reasons:
The web site owner has registered a custom domain to point to the Microsoft Azure Web Site, but has not yet configured Azure to recognize it. Click here to read more.
When a site owner wants to use a custom domain with a Microsoft Azure Web Sites website, Azure needs to be configured to recognize the custom domain name, so that it can route the request to the appropriate server in the region. After registering the domain with a domain provider and configuring a DNS CNAME record to point to the site's Azurewebsites.net address (for example, contoso.azurewebsites.net), the website owner also needs to go to the Azure Portal and configure the site for the new domain. Click here to learn more about configuring the custom domains for a web site.
This is the same configuration settings I am currently using for several domains through Namecheap with Azure hosting and they work as intended.
EDIT:
To summarize, here are the steps you need to take:
1) Create CNAME record redirecting user from your domain to Azure specified domain using tools provided by your DNS hosting service
This step will ensure that when going to www.history-podcasts.com user will transparently be taken to history-podcasts.azurewebsites.net
Type: CNAME
Name: www
Value: history-podcasts.azurewebsites.net
IMPORTANT: Please note that it takes time for DNS servers to update their records therefore you should wait around 30 minutes before continuing.
2) Redirect your naked domain to subdomain using DNS hosting service tools
This step will ensure that when going to history-podcasts.com user will be redirected to www.history-podcasts.com
For Google Domains you can follow this guide here.
3) Add your domain to Azure Website
This step will assure Azure that you own the domain and you want your site to be reachable using specified domain name.
Login into https://manage.windowsazure.com/
Navigate Websites -> [Your Website] -> Configure
Scroll down to Domain names
Click Manage Domains (note that custom domains can only be used when in the Shared, Basic, or Standard modes)
Add your domain www.history-podcasts.com
At this point you should be able to reach your web site using both history-podcasts.com and www.history-podcasts.com domain names.
If your website requires HTTPS, you will have to take extra steps:
http://azure.microsoft.com/en-us/documentation/articles/web-sites-configure-ssl-certificate/

Resources