Certificate for custom domain

How can I generate a letsencrypt certificate with my custom domain name and use it for anvil app? Right now I have published my app to my custom domain but when I try to connect I get a SSL error in the browser for mismatched domain name.

Hi @alexri, do you use the hosted app or the open source app server?
SSL is done for the hosted app without any issue.

As for the latter, simply put https will make it work

anvil-app-server --app MyApp --origin https://my-hostname.example.com

I use the hosted app , buy the certs belong to anvil.works subdomain and not my custom domain , hence browsers throws error complaining of certificate mismatch.

I see. Please just follow this instruction and wait about 24 hours

https://anvil.works/docs/deployment/choosing-urls#using-your-own-domain-name

What happens in 24 hours? The name resolution is fine , my custom domain is pointing to the IP address mentioned in the doc. I am concerned on how to attach a SSL cert that is tied to my custom domain to my app. Some browsers like safari simply refuses to show the site because of domain mismatch between the current SSL certs and my custom domain.

My guess is there is a semi-manual process. I had the same issue and it get fixed in 24 hours
There are other post in the forum about it as well.

This is from the above-mentioned link, while it is not really true, being patient makes it work.

I think Tony’s right, there’s a semi-manual process of generating the SSL certificate for your domain. So even though it’s resolving to the right IP address, you’ll need to wait for the Anvil team to finish that last step. They’ll email you when it’s done (at least that’s my experience with using custom domains).

1 Like

Ah ok … that makes sense. I don’t mind waiting 24 hours but I guess it would be great to have that information upfront or better yet for the domain owners (ie customers) to have more control on the certs. Probably a feature request :slight_smile:

1 Like

Great idea, I just made one here. Thought about it before but just too busy to make it:

Just to update and close this thread , I did receive the mail from anvil support informing the certificate has been installed on the custom domain :+1::+1:

3 Likes