If you have a domain registered with Namecheap and you want to connect it with a DigitalOcean app, you'll need to configure your DNS settings to point your domain name to your app. In this guide, I'll show you how to connect your Namecheap domain with a DigitalOcean app step by step.
Step 1: Obtain the IP Address of Your DigitalOcean App
The first step in connecting your Namecheap domain with your DigitalOcean app is to obtain the IP address of your app. To do this, log in to your DigitalOcean account and navigate to the "Apps" section. Click on the app you want to connect your domain to and then click on the "Networking" tab. Here, you'll see the IP address of your app, which you'll need to configure your DNS settings.
Step 2: Log in to Your Namecheap Account
The next step is to log in to your Namecheap account and navigate to the "Domain List" section. Click on the domain name you want to connect with and then click on the "Advanced DNS" tab.
Step 3: Add an A Record for Your Domain
To connect your domain with your DigitalOcean app, you'll need to create an "A" record that maps your domain name to the IP address of your app. To do this, click on the "Add New Record" button and select "A Record" from the dropdown menu.
In the "Host" field, enter "@" to indicate that the record applies to your root domain. In the "IP Address" field, enter the IP address of your DigitalOcean app. Leave the TTL field set to "Automatic" and then click on the "Save All Changes" button.
Step 4: Add a CNAME Record for the "www" Subdomain (Optional)
If you want to allow visitors to access your app using the "www" subdomain, you'll need to create a "CNAME" record that maps the "www" subdomain to your root domain. To do this, click on the "Add New Record" button and select "CNAME Record" from the dropdown menu.
In the "Host" field, enter "www" to indicate that the record applies to the "www" subdomain. In the "Value" field, enter your root domain name (e.g., "example.com"). Leave the TTL field set to "Automatic" and then click on the "Save All Changes" button.
Step 5: Wait for DNS Propagation
After you've created the necessary DNS records, you'll need to wait for the changes to propagate throughout the internet. This can take anywhere from a few minutes to 48 hours, depending on various factors such as the TTL value of the DNS records and the time it takes for DNS resolvers to update their cache.
Step 6: Verify Your Domain is Connected
Once DNS propagation is complete, you should be able to access your DigitalOcean app using your domain name. To verify that your domain is connected to your app, simply navigate to your domain in a web browser and ensure that your app is displayed.