In this small blog post, I’ll teach you how to use a NameCheap purchased domain on a Heroku application.
The process is quite simple and shouldn’t take you more than 10 minutes.
Purchase your domain on Namecheap.
Once you have purchased your domain, make sure to login to your dashboard on NameCheap.com – then visit your Domain List page.

Set your DNS records properly.
Enter the DNS settings page for your domain by clicking on All Host Records.

In the records settings page, you just need to point your domain to the Heroku servers. Your final settings should look like:
Host Name IP Address/URL Record Type @ http://www.YOUR-DOMAIN.com URL Redirect www heroku-app-name.herokuapp.com CNAME (alias)
You’re done on the NameCheap side of configurations.
Set up your domain on Heroku
The final step is to go to your Heroku app’s settings page and add that domain to your application. Simple as pie.

You’re done! DNS settings usually take up to 24 hours to propagate everywhere, so you may not be able to access your site immediately using your domain name.
During my use cases, I found the domain name to work nearly instantly, but your milage may vary. At any rate, give it at least 24 hours.