Question

App platform docker failing SSL with custom domain

Hi,

I’ve done the following:

  • Created a custom docker container containing a django webapp fronted by gunicorn.
  • Created a container registry in digital ocean and uploaded the image there.
  • Created an app platform using that docker image.
  • Checked that this image runs using the inbuilt domain. Everything works and the app runs! However, I’ve now bought a domain from an external domain provider. I’ve added that to my app platform using the “We manage your domain” option and the networking tab tells me (after a bit of a wait) that digital ocean is happy it now can serve the domain.

However, my app platform no longer works. Clicking on the old URL gives me a 400 bad gateway and clicking on the new domain gives me an SSL error (SSL_ERROR_INTERNAL_ERROR_ALERT on firefox). Are there other steps I need to take (e.g. in the spec file) to link up the SSL config for my custom domain?

Thanks


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
January 21, 2025

Hi there,

This might have been a temporary hiccup, are you still seeing the issue?

Also, after setting your domain, did you also update the ALLOWED_HOSTS in your Django settings.py file to include your custom domain and the App Platform URL?

If you’ve defined the allowed hosts already and you are still seeing the issue, you could also reach out to the DigitalOcean support team who will be able to further investigate this for you as well:

https://www.digitalocean.com/support/

Let me know how it goes!

- Bobby.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.