Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Host root domain on CloudControl

I want to host a root domain like "example.com". The Alias addon allows you to host sub domains like "www.example.com".

But how to host the root domain "example.com" on cloudcontrol? Because I want to create a redirect from example.com to www.example.com.

I have already setup an alias from www.example.com to my cloudControl app successfully. But I was not able to setup an alias from example.com to my cloudControl app.

I'm not sure, whether I have understood everything with the Alias addon.

Best regards, Christian

like image 972
CEikermann Avatar asked Feb 12 '26 08:02

CEikermann


2 Answers

Since you can't add a CNAME to a root romain you can't link it directly to cloudControl.

The ugly way would be to manually create A-records to the (currently 3) cloudControl-loadbalancer-IPs, but cloudControl changes these (adds/removes loadbalancers) sometimes so you shouldn't do this.

For my apps I usually use the "URL"-record-type many DNS-Providers provide. In the background they use A-records to a seperate webserver that returns a redirect to the www-version.

like image 135
Denis Cornehl Avatar answered Feb 15 '26 18:02

Denis Cornehl


You can also use a service like DNS Made Easy. They provide a custom type called ANAME, that's basically a CNAME without the CNAME limitations. They take care of updating the IP addresses in the background when necessary.

http://www.dnsmadeeasy.com/technology/aname-records/

like image 20
pst Avatar answered Feb 15 '26 16:02

pst



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!