将Godaddy域名映射到Azure应用服务时遇到问题。

huangapple go评论72阅读模式
英文:

Trouble mapping Godaddy Domain to Azure App Service

问题

好的,以下是翻译好的内容:

我感觉自己在这个问题上很头疼。

我有一个部署在Azure应用服务上的网站。访问 <myapp>.azurewebsites.net 没问题。

我购买了一个由Godaddy提供的域名。

我已经采取的步骤:

1)在Godaddy中添加了一个A记录,类型为“@”,值为我Azure应用服务的自定义域部分标识的IP范围。

2)添加了一个CName,名称为“www”,值为 <myapp>.azurewebsites.net

3)然后,在Azure门户中,为了验证Godaddy域名,我通过了自定义域验证过程,其中要求添加一个TXT记录,名称为“asuid”,并提供了一个值。我将其添加到了我的Godaddy域名中并点击了验证。我创建了SSL绑定。在我的Azure门户上,所有都显示为绿色。

然而,当我访问 https://www.myGodaddyDomain.com 时,我看到了蓝屏:

404 网站未找到。
可能出现此错误的原因之一是:

在Azure中尚未配置自定义域。查看如何映射现有域以解决此问题。
客户端缓存仍将域指向旧的IP地址。通过运行命令 ipconfig/flushdns 清除缓存。
有关更多问题,请查看App Service域名常见问题解答。

我在这里漏掉了什么?

英文:

Okay, I feel like I'm pulling my hair out on this one.

I have an website deployed to Azure App Service. Going to &lt;myapp&gt;.azurewebsites.net works fine.

I have a domain purchased by Godaddy.

Steps I've taken:

  1. Added an A record to Godaddy with type "@" and value of the IP range identified in the Custom Domain section of my Azure App Service.

  2. Added a CName with Name of "www" and value of &lt;myapp&gt;.azurewebsites.net.

  3. Then, on Azure portal, to validate the Godaddy domain I went through the custom domain validation process, in which it says to add a TXT record with a name of "asuid" and provides a value. I added that to my Godaddy domain and clicked validate. I created the SSL binding. On my Azure portal, all shows green.

Yet when I go to https://www.myGodaddyDomain.com I get the blue screen:

404 Web Site not found.
You may be seeing this error due to one of the reasons listed below :

Custom domain has not been configured inside Azure. See how to map an existing domain to resolve this.
Client cache is still pointing the domain to old IP address. Clear the cache by running the command ipconfig/flushdns.
Checkout App Service Domain FAQ for more questions.

What am I missing here?

答案1

得分: 1

在你的Azure Web应用中 > 左侧面板 > 转到设置 > 自定义域 > 在右侧面板下方 > 添加自定义域 > 域提供程序选择所有其他域服务 > 保留TLS/SSL证书 > 应用服务托管的证书TLS/SSL类型 > SNI SSL,基于IP的SSL > 在域标签下方添加你的域名 > 例如 - siliconsidcloud.com > 主机名记录类型设置为A记录(example.com)> 域验证部分将在下方打开:

将Godaddy域名映射到Azure应用服务时遇到问题。

将Godaddy域名映射到Azure应用服务时遇到问题。

为了让Azure与我们的域进行身份验证,请按照以下步骤操作:

复制A记录,如下所示:

将Godaddy域名映射到Azure应用服务时遇到问题。

访问你的Godaddy > dcc.godaddy.com/manage/siliconsidcloud.com/dns > 点击A记录 > 右侧的编辑按钮 > 在A记录部分 > 输入A,名称@ 值-粘贴从上面域验证示例中复制的IP地址-值20.118.40.3 > 点击保存 > 更新DNS记录选项卡将打开,并DNS记录将被更新。

现在访问你的Web应用和TXT记录,如下所示:

将Godaddy域名映射到Azure应用服务时遇到问题。

访问你的Godaddy > dcc.godaddy.com/manage/siliconsidcloud.com/dns > 如果你没有TXT记录,请点击右上角的添加 > 在类型中选择TXT > 在名称中输入asuid > 在值中添加从Azure TXT记录中复制的值 > 点击添加记录。

现在,访问你的Azure门户并点击验证,如下所示:

将Godaddy域名映射到Azure应用服务时遇到问题。

当验证通过消息出现时,如果验证失败,请等待2-3分钟,然后再次尝试,因为这取决于域提供商的不同 > 点击添加按钮,自定义域将被添加 > 添加自定义域和绑定通知 > 自定义域将被添加并标记为安全的 > 现在,获取你的自定义域示例的URL - siliconsidcloud.com 并浏览你的Web应用 > Web应用内容将在你的自定义域上可用。

如果在你的自定义域中使用www > 在域部分添加 www.siliconcloudsid.com
或**
*.siliconcloudsid.com 并在你的Godaddy DNS设置中创建CNAME和TXT记录,如下所示

在域选项卡中添加www.siliconsidcloud.com或*.siliconsidcloud.com并尝试注册自定义域,检查哪个有效。

请参考下面的图像来自这个 MS文档

将Godaddy域名映射到Azure应用服务时遇到问题。

在验证成功后,如果在添加域时收到无绑定警告 > 如果你选择稍后添加证书 > 请确保按照这个 文档 添加你的私人证书,并按照这个 文档2 进行绑定 如果选择应用服务托管的证书,就不会出现无绑定错误。

此外,你可以在本地笔记本的Windows终端中运行以下命令,如下所示:

ipconfig/flushdns

本地:

将Godaddy域名映射到Azure应用服务时遇到问题。

并在你的Web应用控制台中运行以下命令来检查DNS解析:

nslookup www.siliconsidcloud.com

将Godaddy域名映射到Azure应用服务时遇到问题。

参考:

Azure web app custom domain problem - Microsoft Q&A 作者:Ryan Hill

cname - Azure Custom Domain not resolving - Stack Overflow 作者:ardoRic

FAQ App Service Domain and Custom Domains - Azure App Service

英文:

In your Azure Web app > Left Pane > Go to Settings > Custom domains > In right pane down > Add custom domain > Domain provider Select All other domain services > Keep TLS/SSL certificate > App Service Managed Certificate TLS/SSL type >SNI SSL, IP based SSL > In Domain tab below add your domain name > Example - siliconsidcloud.com > Hostname record type set to A record (example.com) > Domain validation section will open below:-

将Godaddy域名映射到Azure应用服务时遇到问题。

将Godaddy域名映射到Azure应用服务时遇到问题。

In order for Azure to authenticate with our domain follow the steps below:-

Copy the A record like below:-

将Godaddy域名映射到Azure应用服务时遇到问题。

Visit your go daddy > dcc.godaddy.com/manage/siliconsidcloud.com/dns > Click on A record > Edit button on right > in A record section > Type A , Name @ Value - Paste the copied IP address from A record above from Domain validation example- Value 20.118.40.3 > click on Save > Update a DNS record tab will open and DNS record will be updated.

Now Visit your Web app and TXT record like below:-

将Godaddy域名映射到Azure应用服务时遇到问题。

Visit your go daddy > dcc.godaddy.com/manage/siliconsidcloud.com/dns > If you do not have TXT record in place click on Add from the right top > In Type choose TXT > In Name type asuid > In Value add the Copied value from above Azure TXT record> click on Add record

Now, Visit your Azure Portal and click on Validate like below:-

将Godaddy域名映射到Azure应用服务时遇到问题。

After Validation passed message comes, If validation fails, Wait for 2-3 minutes and try again as it varies depending on the domain provider > Click on Add button the Custom Domain will be added > Adding Custom Domain and binding notification > custom domain will be added and marked as Secured > Now, Take the URL of your custom domain example - siliconsidcloud.com and browse your web app> the web app content will be available in your custom domain.


> If you're using www in your Custom Domain > Add the
> www.siliconcloudsid.com in the domain section
> OR**
> *.siliconcloudsid.com and create CNAME and TXT record like below in your Go daddy DNS settings

Add www.siliconsidcloud.com or *.siliconsidcloud.com in the Domain tab and try to register the Custom domain with both and check which works.

Refer below image from this MS Document:-

> 将Godaddy域名映射到Azure应用服务时遇到问题。

After validation succeeds and while adding the domain if you receive No binding warning > If you selected Add certificate later > make sure you add your private certificate by referring this Document and binding by referring this Document2 If you select App service Managed Certificate the No binding error won't come.

Additionally, You can run this command in your local Laptops Window terminal like below:-

ipconfig/flushdns

Local:-

将Godaddy域名映射到Azure应用服务时遇到问题。

And run the below command in your Web app console to check the DNS resolution:-

nslookup www.siliconsidcloud.com

将Godaddy域名映射到Azure应用服务时遇到问题。

Reference:-

Azure web app custom domain problem - Microsoft Q&A By Ryan Hill

cname - Azure Custom Domain not resolving - Stack Overflow By ardoRic

FAQ App Service Domain and Custom Domains - Azure App Service

huangapple
  • 本文由 发表于 2023年5月29日 23:23:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/76358515.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定