Custom Domains For Windows Azure Web Sites Using Domain Masking
If you read the Azure documentation on Configuring a Custom Domain Name for a Windows Azure Web Site, it describes configuring a custom domain for a Windows Azure Web Site using a CNAME record with your domain registrar. You’ll also read that to do this, your web site has to run on a “Reserved Instance” as opposed to a “Shared Instance”. But, there’s also a way to get a custom domain mapped to your web site while staying with a “Shared Instance”.
The technique is to use Domain Masking. I’ve seen it also called URL Frames, URL masking and URL cloaking. It depends on your domain registrar. Regardless, the trick is for the browser to use a URL redirect in conjunction with a frame to load a web site while preserving the custom domain name in the address bar. This isn’t as clean as using a CNAME record which avoids the redirect and doesn’t use a frame, but it’s a simple alternative that might meet your needs.
You can see this in action if you visit bushschooladventure.com. A request to the web site causes a browser redirect to bushschooladventure.azurewebsites.net which is where the site is actually hosted.
Here’s the network trace for the request in Fiddler:
Notice that request #2 results in an HTTP 302. That’s the browser redirect from “bushschooladventure.com” to “bushschooladventure.azurewebsites.net”. Looking at the URL address in the browser though, it still says “bushschooladventure.com” which is perfect. If I had used a plain URL redirect, the address bar would have shown “bushschooladventure.azurewebsites.net” which is undesirable.
Looking at the page source, we can see a <frameset> being used:
<frameset>
<frame src=”http://bushschooladventure.azurewebsites.net“></frame>
</frameset>
To configure this with my domain registrar, Namecheap, I set the following hostname records for a “URL Frame”. GoDaddy calls it domain masking.
You can’t see the full URL in the text boxes there, but I assure you that it points to “bushschooladventure.azurewebsites.net”.
And that’s it! A custom domain name for my Windows Azure Web Site without running the site on a reserved instance machine.
Hope this helps,
Mark
Pingback: Dew Drop – August 10, 2012 (#1,382) | Alvin Ashcraft's Morning Dew
Pingback: Azure Web Sites With Custom Domains for Ten Bucks a Month | Cloudy Developer
stopped coloring my hair with traditional hair dyes that contain ammonia and other hair-damaging ingredients, I no longer need the same types of intensive shampoos and louis vuitton imitation purses for cheap http://louisvuittonimitationwalletsforwomen.blogspot.com/
Are you in a position to guide myself to your internet marketer or guy which deals with your blog post, I’d like to determine if it could be simple to be described as a guest poster.
Its such as you read my mind! You seem to grasp a lot
about this, such as you wrote the book in it or something.
I think that you just could do with a few percent to drive the message house a bit, but other
than that, this is magnificent blog. An excellent read.
I’ll certainly be back.
I don’t know whether it’s just me or if perhaps everyone else encountering issues with your website.
It appears like some of the written text within your posts are running
off the screen. Can someone else please comment and let me know if this is
happening to them as well? This might be a issue with my web browser because
I’ve had this happen before. Many thanks