Scenario: You have registered a domain name through NameCheap and you have a running instance of Amazon EC2. Now you want to point the domain to the that EC2 instance.
Solution:
- Log into NameCheap.com and Amazon Web Services (AWS).
- In your NameCheap.com dashboard, go to “Domain List” and locate the domain name you want to point to AWS. Click the “manage” button.
- On the next page, click “Advanced DNS” tab. Under host records section, you should see 2 entries with “@” and “www”.
- Switch to AWS management console and go to your EC2 instance.
- On the left menu, click “Elastic IPs”
- Click “Allocate new address”.
- Select the new address you just created and click “Associate address”.
- Select your network interface from the drop-down.
- Select the private address from the drop-down and click “Associate”
- The changes in “Elastic IPs” will reflect on public IP address of the EC2 instance.
- Copy the public IP address and public DNS
- Switch back to NameCheap.com, locate entry with “@” symbol, set type to “A Record” and set value to public IP address
- Locate entry with “www”, set type to “CNAME Record” and set value to public DNS
- Apply your changes and you’re done!
You may have to wait a little before the association takes place. I’d say about 5 minutes. Now open your browse and type your domain name, it should now point to your EC2 instance.
Thank you for the useful post. Your steps worked correctly for me.
Thank you very much!
No need to setup route53 with this ?
Awesome post, helped me a lot after not being able to find solutions anywhere else:)
Thank you. This was so helpful!
it works for me
Thanks mate 🙂