Search code examples
amazon-web-servicessubdomainamazon-route53

How to create a sub domain to point to Cloudfront CDN endpoint using a domain managed outside of AWS


We purchased a domain from GoDaddy, for example, say mycompany.com.

My colleague then moved it to Wix.com to publish our marketing site, which will be available at the mycompany.com url. I need to add a subdomain in AWS, pointing to a Cloudfront CDN endpoint.

To shed more light into the current situation, here is a little more info:

When I check GoDaddy, it shows Nameservers, referencing the Wix servers. For DNS, it says We can't display your DNS information because your Nameservers aren't managed by us.

When I check Wix.com, I see that Managed by Third Party, Connected by DNS and still provides the option to transfer to Wix.

Both Godaddy and Wix provide the option to add a subdomain.

I'd rather do that in AWS.

What is my best option here? Should I transfer the domain to AWS and manage it there? If so, how do I then route traffic from mycompany.com to the marketing site?

Is there a way to keep it as is, but still add a subdomain on the AWS side for example.mycompany.com?

I really regret not registering this domain via AWS in the first place, but lesson learned. Any help would be much appreciated.


Solution

  • I am assuming that your DNS is being hosted via wix.com.

    If you want to migrate to Route 53 its not actually too hard. Start by setting up a public hosted zone within Route 53 with the domain name you setup.

    Next you would want to perform a zone lookup for all your DNS records, you can use Googles DIG Tool with the ANY option or do this via cli by running dig example.com ANY.

    Now that you have all the records you will need to create them within your public hosted zone, follow this tutorial if you need any assistance. Do not add the SOA or NS records.

    Now that all records have been migrated get the values from the NS record in your public hosted zone and replace the nameservers within GoDaddy to point at these values.

    Your DNS will migrate over whichever period the TTL of your previous NS record is set as. Once this has migrated and it working you can add your CNAME record as you originally wanted to add.