简体   繁体   English

使用 Surge 将站点部署到自定义域后出现“SSL_ERROR_BAD_CERT_DOMAIN”错误

[英]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.

相关问题 SSL_ERROR_BAD_CERT_DOMAIN - SSL_ERROR_BAD_CERT_DOMAIN 移动Magento后出现SSL错误“ ssl_error_bad_cert_domain” - SSL error “ssl_error_bad_cert_domain” after moving Magento 安装证书后如何解决错误代码:SSL_ERROR_BAD_CERT_DOMAIN? - How can I fix Error code: SSL_ERROR_BAD_CERT_DOMAIN after installing certificate? AWS Elastic Beanstalk - 添加了 SSL 证书但仍然出现 HTTPS 错误:SSL_ERROR_BAD_CERT_DOMAIN - AWS Elastic Beanstalk - SSL Certificate added but still HTTPS Error: SSL_ERROR_BAD_CERT_DOMAIN 如何解决“NSS 错误 -12276 (SSL_ERROR_BAD_CERT_DOMAIN)” - How to solve "NSS error -12276 (SSL_ERROR_BAD_CERT_DOMAIN)" Firefox何时会使用通配符证书抛出ssl_error_bad_cert_domain? - When does Firefox throw ssl_error_bad_cert_domain with a wildcard certificate? .htaccess:非www到www(带https)在Firefox中显示ssl_error_bad_cert_domain - .htaccess: non www to www (with https) shows ssl_error_bad_cert_domain in Firefox 将非www重定向到www https nginx(SSL_ERROR_BAD_CERT_DOMAIN) - Redirect non-www to www https nginx (SSL_ERROR_BAD_CERT_DOMAIN) 安装自签名p12证书后,在firefox上获取ssl_error_bad_cert_alert - Getting ssl_error_bad_cert_alert on firefox after installing self signed p12 certificate Heroku 自定义域 ssl 名称不匹配错误 - Heroku custom domain ssl name mismatch error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM