简体   繁体   中英

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.

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

On GoDaddy I've configured the CNAME and A types to point to 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. The certificate registered on the site is provided by 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?

Thanks!

SSl with surge comes out of the box with *.surge.sh domains. For these domains you can force a redirect of http to 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. 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).

I would try if I were you maybe s3 with cloudfront? it does not cost that much if the traffic is not that high.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM