My main objetive is to redirect mydomain.com to lintr.ee/mydomain. I have my account at linktree all set up. I’ve already bought mydomain.com and set Godaddy’s Name Servers to look for Digitalocean’s DNS for directions. I’ve also used Digitalocean’s DNS to create a “CNAME” entry to redirect WWW to @. But now I’m stuck because an “A” entry will only let me specify an IP or a resource that I own on Digitalocean. What should I do? How do I redirect mydomain.com to my linktree link using Digitalocean DNS config?
PS: this is just a temporary redirect while I create my site
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.
Heya,
While you can use DNS to create an alias with a CNAME record (like making
www.mydomain.com
point toexample.otherdomain.com
), DNS by itself doesn’t handle HTTP redirects (like redirecting users who visitmydomain.com
tolintr.ee/mydomain
). You need a Droplet and a WebService like Apache or Nginx to do that.Set up a DigitalOcean Droplet:
Nginx Configuration:
Remove the current server block and replace with the following:
Set A Record:
Finalize:
Note on HTTPS: If you plan to use HTTPS for
mydomain.com
, you’ll need to set up a certificate (e.g., using Let’s Encrypt) and adjust the Nginx configuration accordingly.While the above process requires maintaining a droplet, it gives you flexibility. Once you have your website ready, you can reconfigure the Nginx server to serve your website instead of redirecting to Linktree.