In this guide, we will cover how to use your Namecheap registered domain as a production domain for your ZEIT Now deployments.
First, you need to add your Namecheap registered domain to your ZEIT account. To get started, use the Now CLI:
now domains add <domain>
The command above adds the domain to your ZEIT account. Once it has been added, the Now CLI outputs some information needed to verify ownership of the domain.
There are two options available for domain verification:
- Verify with Nameservers.
- Verify with TXT record.
If you want to opt for verifying your domains with Nameservers, you must use the nameservers listed when you added a domain via the Now CLI. The upside to verifying with Nameservers is that you are verifying and pointing to Now at once.
Use the following command to list the set of nameservers needed for verification:
now domains inspect <domain>
Now, head over to namecheap.com, log in and click on Domain List.
Next, click on the Manage button on the domain you want to migrate to Now as indicated by the arrow in the image above.
In the page you are directed to, scroll down to the NAMESERVERS section, click on the dropdown form and select CustomDNS as shown in the illustration below:
Add the intended nameservers gotten from running the inspect command to the Custom DNS form in the order they are given and save the configuration.
Once Namecheap is done propagating the newly changed DNS for your domain, then your domain is ready to be verified. ZEIT automatically checks the domain for verification. However, if you are keen on manually verifying it, then run the following command:
now domains verify <domain>
This option is great if you intend to verify your domain, but not point to Now yet!
In your Namecheap Domain List dashboard, on the domain you want to migrate, click on the Advanced DNS tab. Now, scroll down to the Host Records section, and click on the Add New Record button.
TXT Record as the record type, add
_now as the host, and the value you were given for the record when adding your domain. You can fetch the value again using the
now domains inspect <domain> via the Now CLI.
Your domain will be verified after adding the TXT record. Once ZEIT verifies your domain, you'll automatically receive an email. You can also manually use the command below to force a domain verification:
now domains verify <domain>
Once your domain has been verified on Now, you can configure your domain with DNS records and add it as a production domain for deployments.
Now provides an easy to use command that allows you to add DNS records from the CLI. In this example, you can configure your domain with a set of Gmail MX records via the
now dns add command:
now dns add <domain> @ MX ASPMX.L.GOOGLE.COM 1 now dns add <domain> @ MX ALT1.ASPMX.L.GOOGLE.COM 5 now dns add <domain> @ MX ALT2.ASPMX.L.GOOGLE.COM 5 now dns add <domain> @ MX ALT3.ASPMX.L.GOOGLE.COM 10 now dns add <domain> @ MX ALT4.ASPMX.L.GOOGLE.COM 10
Learn more about using the
now dns command.
Adding your production domain to a project can be done from the ZEIT Dashboard by selecting the project's Domains tab and entering it there, you can find more information on this in the custom domains documentation.
You can then deploy to your production domain with a single command:
If you already verified your domain with nameservers, then this step is done.
The final step of migrating your domain to Now is to point your domain to ZEIT DNS with the intended nameservers set. Using
now domains inspect <domain>, you can always find the intended nameservers to use with your domain.
Once Namecheap's propagation of the updated nameservers is complete, your domain will automatically point to the app you deployed before.