将 Google Domain 配置为指向 Azure 网站 [英] Configuring Google Domain to point to Azure website

查看:18
本文介绍了将 Google Domain 配置为指向 Azure 网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个托管在 Azure 上的网站,我试图将一个域从 Google Domains 指向.

我目前的配置如下:

名称类型数据@一个XXX.XXX.XXX.XXXwww CNAME history-podcasts.azurewebsites.netawverify CNAME awverify.history-podcasts.com

我正在按照此处的说明进行操作:为 Azure 网站配置自定义域名.

当我转到 Azure 门户以管理域并尝试在 DOMAIN NAMES 中输入 url 时,我收到以下消息:

<块引用>

未找到从 history-podcasts.com 指向 history-podcasts.azurewebsites.net 的 CNAME 记录.也找不到替代记录 awverify.history-podcasts.com 到 awverify.history-podcasts.azurewebsites.net

当我转到域的 URL 时,我收到以下消息:

<块引用>

您尝试访问的网站在此 Microsoft Azure 网站区域不可用.这可能是由于以下几个原因之一:

  1. 网站所有者已注册自定义域以指向 Microsoft Azure 网站,但尚未配置 Azure 以识别它.点击此处了解更多信息.

当站点所有者想要将自定义域与 Microsoft Azure 网站一起使用时,需要将 Azure 配置为识别自定义域名,以便它可以将请求路由到该区域中的相应服务器.向域提供商注册域并配置 DNS CNAME 记录以指向站点的 Azurewebsites.net 地址(例如 contoso.azurewebsites.net)后,网站所有者还需要转到 Azure 门户并配置站点新域.单击此处了解有关为网站配置自定义域的更多信息.

这是我目前通过 Namecheap 和 Azure 托管为多个域使用的相同配置设置,它们按预期工作.

解决方案

总而言之,以下是您需要采取的步骤:

1) 使用 DNS 托管服务提供的工具创建将用户从您的域重定向到 Azure 指定域的 CNAME 记录

此步骤将确保用户在访问 www.history-podcasts.com 时会被透明地带到 history-podcasts.azurewebsites.net

类型:CNAME名称:www值:history-podcasts.azurewebsites.net

重要提示:请注意,DNS 服务器更新其记录需要时间,因此您应该等待大约 30 分钟才能继续.

2) 使用 DNS 托管服务工具将您的裸域重定向到子域

此步骤将确保在访问 history-podcasts.com 时,用户将被重定向到 www.history-podcasts.com

对于 Google Domains,您可以在此处遵循本指南..p>

3) 将您的域添加到 Azure 网站

此步骤将向 Azure 保证您拥有该域,并且您希望使用指定的域名可以访问您的站点.

  • 登录 https://manage.windowsazure.com/
  • 导航 网站 ->[您的网站] ->配置
  • 向下滚动到域名
  • 单击管理域(请注意,自定义域只能在共享、基本或标准模式下使用)
  • 添加您的域www.history-podcasts.com

此时您应该能够使用 history-podcasts.comwww.history-podcasts.com 域名访问您的网站.

如果您的网站需要 HTTPS,您将不得不采取额外的步骤:

http://azure.microsoft.com/en-us/documentation/articles/web-sites-configure-ssl-certificate/

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:

  1. 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/

这篇关于将 Google Domain 配置为指向 Azure 网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆