If you have an application hosted in Window's Azure your application will have a host name such as mysite.cloudapp.net. You will probably also have a CNAME that points www.mysite.com to the cloudapp. So what if both domains have been indexed by Google? How do you get cloudapp.net URL off of Google?
This is not a problem with Windows Azure; this can happen to any site that has two hostnames/IPs that point to the same site. It is just a recurring issue I see during my Azure consultancy work and worth a quick explanation and solution.
Both mysite.cloudapp.net and mysite.com are pointing to the exact same application and servers so there is no way you can switch one off since they are one and the same, just accessible through two paths. (Well, more than two since they will at least have IP address paths too.)
This issue can be solved in your application code. Your application will need to determine what host name the application has been accessed through and either display the page if the host name is correct or 301 redirect to the correct hostname if the host name is wrong. So how to do it?
301 Redirect cloudapp.net to your correct domain
This can be done in your application by setting a redirect rule using the IIS URL Rewrite Module. There is already a template in IIS's Rewrite Module for doing this called "Canonical domain name" under the SEO section, however I don't particularly like this one since it redirects everything that isn't the correct hostname (e.g. your development machine). Still, you should have a look at it to see what it is doing.
The key steps of what your rule should be doing are:
- Check to see if the host name is incorrect
- If it is it should issue a redirect to the correct domain name
- The redirect should be a 301
- The page should remain e.g. http://mysite.cloudapp.net/hello.html -> http://www.mysite.com/hello.html
- If the host name is not in violation the page rendering should continue without further action
So you can make your own however you feel is best but here is my example to get you going.
<rewrite> <rules> <rule name="CanonicalHostNameRule1"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^mysite\.cloudapp\.net$" negate="false" /> </conditions> <action type="Redirect" url="http://www.mysite.com/{R:1}" /> </rule> </rules> </rewrite>
This code goes in the <system.webServer>...</system.webServer> section of your web.config. Again this is only an example, you may wish to add another condition for handling your IP address for example.
This redirect will solve the problem of any users visiting the incorrect site. Also, because it is a 301 redirect, over a week or two Google will remove the cloudapp.net URL from its search results and attribute its existing value to the correct URL.
Thank you so much for sharing! This is what I need to find.
ReplyDeletepictaram
Your article gives me another approach on the subject.
ReplyDeleteadultwork
No worries, Pointing two URLs to the same website is a good way to direct traffic to your site from several different domain names.For more details visit, Do my excel homework
ReplyDeleteWholesale printed custom perfume boxes with the highest quality and affordable prices. Free worldwide Delivery and free Custom Perfume Boxes design.
ReplyDeleteBuy online wholesale custom eyeshadow palette packaging and packaging at seashore packaging at the easy price Free shipping worldwide with 24/7 customer support.
ReplyDeletePackaging town is a one stop solution for the short-run tincture packaging needs and supplies. At affordable prices. Request a free quote now.
ReplyDeletearticle is good but you can use oscola referencing tool for better understanding.
ReplyDeleteby the way you can also use Vancouver Referencing Style for writing.
Deletewhy my host name does not appear on google. Host name is online assignment provider
ReplyDeletePackaging town is a one stop solution for the short-run tincture packaging needs and supplies. At affordable prices. Request a free quote now.
ReplyDeletePacakaging town is a one stop solution for the short-run custom apparel boxes needs and supplies. At affordable prices. Request a free quote now.
ReplyDeleteBuy fashionable men's sweatshirts at Wild Goat. Shop the Latest Collection of Men's Summer and Winter Sweatshirts in Pakistan. Exclusive collection of Men's sweatshirts are available at Wild Goat. Shop the best quality and finest fabrics from Wild Goat. Style a classy look in Wild Goat's finest sweatshirts.
ReplyDeletebuy electronics online from alfatah at best prices. Get free shipping
ReplyDeletebuy zipper hoodie online for men from wild goat clothing at best pricces. Get Free shipping
ReplyDeleteThis Development company developed many websites. Don't worry! If hosting name appear on google with same name, This is beneficial for hosting company. There are many companies that provides the hosting services.
ReplyDeleteIf your are worry about house roof and you want solve this problem, then you should hire Roofer Service Centennial for best services.
This post is very informative. You discuss all the key point like Check to see if the host name is incorrect, If it is it should issue a redirect to the correct domain name and The redirect should be a 301.
ReplyDeleteautomotive locksmith Dallas provide best locksmith services. This company provide Commercial Locksmith services and Broken Key Extraction services.
When you need to repair, replacement, new system installation, or kept maintenance for your indoor and outdoor Heating systems, you can rely on Lock repair services in Jacksonville FL expert team to get the job done quickly and efficiently.
ReplyDeleteIts great opportunity to get know about, What is Google My Business.
ReplyDeleteThank you for giving this useful knowledge. I'm seeking for techniques like this to help me do my task quickly. I am looking to write my law essay UK, this will provide my more tips to complete my essay.
ReplyDeleteIf you're looking for a trustworthy foundation repair Edmonton service in Edmonton, then look no further than the Ramma Foundation. We've been providing exceptional foundation repair services to the region for years now, and we're dedicated to ensuring that your home looks and feels its best. Our team of skilled and certified professionals is equipped with the latest technology and equipment, so you can be sure that your home will stay structurally sound long after our work is done. Contact us today to schedule a consultation!
ReplyDeleteLooking for a dependable, fast and easy way to transport your cargo? Hasten contracting is your perfect choice! We offer reliable dry bulk trucking in Houston, Texas that can take your cargo to any destination you need! Our dry bulk trucking in Houstondrivers are experienced and licensed professionals who will make sure your cargo arrives on-time and in perfect condition. Contact us today to get started!
ReplyDeleteThis comment has been removed by the author.
ReplyDelete301 Redirect cloudapp.net to your correct domain, yess it is right main get the best cheap towing service near me at cheap price.
ReplyDeleteWe are specialized in international recruitment of skilled workers, mainly in trades and in immigration to Canada.immigration consultant alberta
ReplyDeleteFill out the assignment requirement form and include every detail about the task you are delegating to us. You also get the option to upload the additional resource materials while submitting the form. Use our live chat support for any confusion. best website to buy assignment
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteFor instance, first-time passport applicants must submit many pictures, paperwork, and application forms in person. Additionally, all babies, toddlers, and newborn children need passports for foreign travel. Urgent passport
ReplyDeleteAs someone who has worked with Windows Azure, I can attest to the issue of having multiple hostnames indexed by Google. However, there is a solution to this problem. On a separate note, for those in Abu Dhabi, it may be worth checking out legrand plug sockets abu dhabifor their high-quality plug sockets.
ReplyDeleteHaving an application hosted in Windows Azure allows for seamless scalability and reliability. Just like how commercial and residential fencing Edmontonprovides security and durability for properties.
ReplyDeleteI appreciate you providing the knowledge. I appreciate the good insights and experiences you shared in your post. Keep going. 24 Hour Towing Manhattan
ReplyDelete
ReplyDeleteAzure hosting certainly provides a unique hostname for your applications, like mysite.cloudapp.net. Just as hosting services are essential for digital projects, creating the right physical workspace is crucial. If you're considering an office transformation, explore office fit-out services to ensure your workspace mirrors the efficiency and reliability of your digital presence.
Absolutely, technical issues can affect various websites. Similarly, when it comes to renovating your villa renovation Dubai, it's essential to choose a reliable and experienced team to ensure a seamless transformation. Trust in professionals who understand the intricacies of your project.
ReplyDeleteAbsolutely, technical issues can affect various websites. Looking for a renovation contractor in Edmonton? RoadBridge offers top-notch renovation services, ensuring quality work for both residential and commercial projects.Whether it's residential or commercial demolition.
ReplyDelete