Question

How to setup CNAME to redirect static app platform

Connected Tutorial
This question is a follow-up to this tutorial:

Hello,

I have a Google Domain and it is already being redirected to Digital Ocean servers (ns1, ns2 and ns3). My static portfolio was running in apache in a CentOS droplet, let’s use the domain https://mywebsite.com.

I followed then this tutorial (https://www.digitalocean.com/community/tutorials/how-to-deploy-a-static-site-from-github-with-digitalocean-app-platform-quickstart) and my website was successfully deployed, but now I want to redirect www.mywebsite.com to the link generated by the app platform.

Example: User accesses https://www.mywebsite.com and remains in this url but the content from portfolio-12345.ondigitalocean.app. is loaded.

For this I followed another tutorial: https://www.digitalocean.com/docs/app-platform/how-to/manage-domains/

As far as I could understand I had to configure it in Google Domains, however as said initially the Google Domains is pointing to Digital Ocean servers, and I created the following record:

Type Hostname Value TTL (seconds)
CNAME www.mywebsite.com is an alias of portfolio-12345.ondigitalocean.app 43200

I waited some time but my website at www.mywebsite.com is still “Connection refused”.

Did I understand something wrong in the DNS configuration process?

Thanks in advance!


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.

Dikshith Shetty
DigitalOcean Employee
DigitalOcean Employee badge
October 23, 2020
Accepted Answer

Hello there,

If your domain nameserver record is pointing to DigitalOcean nameserver then you have to update the CNAME record in DigitalOcean cloud panel. you can follow below documentation link to add the CNAME record:

https://www.digitalocean.com/docs/networking/dns/how-to/manage-records/#cname-records

It will take 1-12 hours to propagate the changes then the subdomain should be resolving to the given hostname ( example: portfolio-12345.ondigitalocean.app)

Regards,

  • Dikshith

Hi @dikshith thanks for the answer. It really took longer than normal and I thought something was not correct, but it was.

Thank you very much, it is working already.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

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.

© 2023 DigitalOcean, LLC.