0

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:

enter image description here

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!

Community
  • 1
  • 1
Leth
  • 1,033
  • 3
  • 15
  • 40

1 Answers1

0

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 (e.g. 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.

Omar Kacimi
  • 61
  • 1
  • 4
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/low-quality-posts/26664253) – user1810087 Jul 14 '20 at 07:44
  • Thank you for your feedback @user1810087. As far as I understood, this is the Q "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?" I did provide an answer as I specified the steps that are needed according to the provider to remedy to the problem. Am I missing something ? – Omar Kacimi Jul 14 '20 at 15:18
  • At the time of my review, you did not provide an answer, but after. One point of a review is to get people to improve their answer, which you did. However, 1. you have two links to the same page, but it leaves the impression you provided two different sources for your answer. 2. Put the essential information from the link into the answer. 3. The answer itself sounds very uncertain, in terms of you don't know for sure. 4. The last sentence is an opinion based suggestion... Thus the answer is still more of a comment. (and please note I'm not the downvoter) – user1810087 Jul 15 '20 at 07:38
  • Thank you again for your valuable feedback. I took in account remarks 1 and 2 as far as I understand into account. Regarding 3. I am not sure of how I seem uncertain there because I have the feeling my statement is clear. Regarding 4. You are right, I am making a suggestion for an alternative solution. You are also on the spot in that it is opinion-based but I imagine it is better as not suggesting any alternatives at all ? I imagine the point here is not only answering questions but also helping one another and in that spirit a suggestion although subjective is better than nothing. – Omar Kacimi Jul 22 '20 at 15:23