[英]Getting 'SSL_ERROR_BAD_CERT_DOMAIN' error after deploying site using Surge to a custom domain
I'm using Surge.sh to deploy a simple react app to a custom domain i bought from GoDaddy.com.我正在使用 Surge.sh 将一个简单的反应应用程序部署到我从 GoDaddy.com 购买的自定义域。
I've followed the instructions regarding custom domains on their site and get a confirmation that my site was deployed successfully: https://surge.sh/help/adding-a-custom-domain我已按照他们网站上有关自定义域的说明进行操作,并确认我的网站已成功部署: https://surge.sh/help/adding-a-custom-domain
On GoDaddy I've configured the CNAME and A types to point to Surge:在 GoDaddy 上,我将 CNAME 和 A 类型配置为指向 Surge:
However when I open up the domain at https://codatheory.dev/ I receive an error message with error code: SSL_ERROR_BAD_CERT_DOMAIN I'm quite new to hosting sites on custom domains, so I'm sure I've misunderstood something.但是,当我在https://codatheory.dev/打开域时,我收到一条带有错误代码的错误消息:SSL_ERROR_BAD_CERT_DOMAIN 我对在自定义域上托管站点还是很陌生,所以我确定我误解了一些东西。 The certificate registered on the site is provided by surge.sh.本站注册的证书由surge.sh提供。
What configuration steps can I take to resolve this issue?我可以采取哪些配置步骤来解决此问题? Do I need to create a new certificate to be signed by a CA in order to use this domain, or have I missed something in my deployment?我是否需要创建一个由 CA 签名的新证书才能使用此域,还是我在部署中遗漏了某些内容?
Thanks!谢谢!
SSl with surge comes out of the box with *.surge.sh domains.带有浪涌的 SSl 开箱即用,带有 *.surge.sh 域。 For these domains you can force a redirect of http to https.对于这些域,您可以强制将 http 重定向到 https。 However, for custom domains surge does not offer SSL as stated explicitly here and they mentioned that it is a feature of surge plus.但是,对于自定义域,surge 不提供 SSL,正如此处明确说明的那样,他们提到这是浪涌加的功能。 To answer your Q, yes you could generate a certificate using some provider (eg https://letsencrypt.org/ ) and add it to surge but that would be within the frame of surge plus (not the free tier anymore).要回答您的问题,是的,您可以使用某些提供商(例如https://letsencrypt.org/ )生成证书并将其添加到浪涌中,但这将在浪涌加的框架内(不再是免费层)。
I would try if I were you maybe s3 with cloudfront?如果我是您,我会尝试使用 cloudfront 的 s3 吗? it does not cost that much if the traffic is not that high.如果流量不是那么高,它不会花费那么多。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.