How to configure a custom domain name for a Windows azure hosting service

Source: Internet
Author: User
Tags domain registration dns names hosting subdomain fully qualified domain name

 

You can map a custom domain name to a Windows azure hosting service in two ways.

  • You can use the cname record to map a service-friendly name ("myhostedservice.cloudapp.net") to a custom domain name to map the Service's DNS name to a custom domain name.
  • You can map the deployed VIP to.

Ing a custom domain name to a fully qualified DNS name provides an abstraction layer that allows you to change the virtual IP address (VIP) of a service without interrupting the service. Although the VIP of the service is rarely changed, the DNS names that are fully Limited provide consistent interfaces for users to access your service.

Ing deployed VIPs to custom domains provides greater flexibility. The cname record must be mapped to a specific subdomain, such as www.example.com or myblog.example.com. The cname record cannot map the root domain itself, nor can it perform wildcard ing, such as "* .example.com ". By associating this VIP with a record, you can create Mappings of these types. The deployed VIP address cannot be changed unless the deployed hosting service is deleted. For more information about the persistence of VIP in Windows Azure, see overview
Of Managing deployments in Windows azure.

Set cname
Record ing to managed service friendly name

When you create a hosting service in the Windows azure cloudapp.net root domain, Windows azure provides a fully qualified DNS name with the specified URL prefix added to the name. A fully qualified DNS name is similar to "myhostedservice.cloudapp.net ". You can use the cname record to map a service-friendly name ("myhostedservice.cloudapp.net") to a custom domain name to map the DNS name of your service to a custom domain name.

Each domain registration program has its own interface for ing DNS record entries, but they all need some basic information to map the custom domain to the Service DNS name.

  • Host or fully qualified domain name-this is a domain with a prefix, used to access your service, suchWww.example.com. Instead of ing services to the root domain (mydomain.com), you must map them to the specified subdomain, as shown in figureWWWOrMyblog.
    Description
    The cname record must be mapped to a specific subdomain, such as www.example.com or myblog.example.com. The cname record cannot map the root domain itself, nor can it perform wildcard ing, such as "* .example.com ".
  • Record type-specify the cname record.
  • Record value-this is the location of the specified service DNS name. For example,Example.cloudapp.net.

If you are prompted to specify the TTL value for the record, you can accept the default value of this attribute.

Map A records to the deployed
VIP

Windows azure provides virtual IP addresses for each deployment. You can log on to the Windows azure platform management portal to obtain the deployed VIP.

  • Host or fully qualified domain name-this is a domain with a prefix, used to access your service, suchWww.example.com.
  • Record type-specify a record.
  • Record value-this is the location of the specified service VIP.
Configure hosting service to respond to custom domain names

To allow a hosted service to respond to a custom domain name, you must add an end point that maps the custom domain name to the role in the HTTP protocol and service definition file.

Configure hosting service to respond to custom domain names
  1. Open the servicedefinition. csdef file of the Service in the text editor.

  2. Add the endpoints element containing the inputendpoint element to the role element. The following example shows how to add an HTTP input endpoint for the Web role listening port 80 and defining the internal port 80:

    Copy
    <ServiceDefinition name="MyService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
      <WebRole name="WebRole1">
        <Endpoints>
          <InputEndpoint name="HttpIn" protocol="http" port="80" localPort="80" />
        </Endpoints>
      </WebRole>
    </ServiceDefinition>
    

    Description
    LocalportFeatures are optional. If this feature is not defined, the structure will allocate an internal port number at runtime.
  3. Set the endpoint name to the name to be used.

  4. Set the protocol to the communication type to be used. Possible options include HTTP or HTTPS

  5. Specifies the port number to be used for role communication.

  6. Save the file.

 

Original article: http://msdn.microsoft.com/zh-cn/library/gg981933.aspx

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.