I want to prefix this by mentioning that I’m very new to development, and this is a “learning project” for me, so my question might be dumb.
I’m currently using the app platform to host a Flask website. I have a custom domain linked via a flattened CNAME record. I’ve added the subdomain for api.website.com via another CNAME record.
Usually, with Flask, I would do the following to load the root page for a subdomain:
@app.route('/', subdomain="api")
def api_load():
return render_template("page.html")
When visiting the site using the subdomain, flask does not acknowledge it, instead just displaying the default root page.
I think that my issue is being caused by using a CNAME record, however, I can’t reliably see a way to use an A record because I can’t find a static IP for my app.
The only other solution I can see is to create another separate app, and just redirect the subdomain to that instead, but this would double my costs and I’m not eager to do that.
Am I missing something, or is this feature simply not available on the apps platform?
Thanks in advance for your time.
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!
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.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
App Platform does not support a persistent IP address at this moment. You will handle this by the CNAME record and update the value of CNAME with the APP’s URL.
Refer to below link for more details on Domains:
https://docs.digitalocean.com/products/app-platform/how-to/manage-domains/ https://docs.digitalocean.com/products/app-platform/details/limits/
Hope this helps!
Cheers, Sri Charan