Pointing Domain To Your Website
Connecting your domain address to your website isn't as difficult as it sounds. This tutorial assumes that you have registered your domain at Namecheap but if you used another domain registrar you can still follow along since the setup is the same, only your registrar's interface may differ.
When buying a web hosting plan, in the signup process be sure to select the option to use a domain you already own, some web hosts might refer to it as using an existing domain. DO NOT select to "tranfer domain" as this will move the domain from your domain registrar's control and you don't want that, you just want to connect your domain to your web host.
There are 2 ways to point a domain to a website, one is with the web host's nameservers and the other is with your site's IP address, both should be included in the information you recieve when your web hosting account is activated. It can also be found in the control panel of your web hosting account.We will be connecting the domain with the IP address so let's get on with step 2:
Log in to your domain registrar and add the IP address to the "A Record", in NameCheap, you'll find the A Record by clicking the "Domain List" tab in the side bar, then the "Manage" button, and then the "Advanced DNS" tab.
Click "ADD NEW RECORD"and select "A Record" from the drop down box:
Enter @ in the "host" field, and enter your site's IP address number in the "IP Address" field like so:
Add another "A Record" by repeating steps 3 and 4 but this time enter www in the host field:
Having 2 A Records enables your domain to work with and without www in the website address
That's it, if this is the first time you are connecting your domain to a website it may take a few hours for it to start working, so in the meantime you can upload your site files.