Adding a domain purchased on Cloudflare.com to your hosting server typically involves a few key steps: updating your domain's Nameservers to point to your hosting provider and then configuring your hosting server to recognize and host your domain.
Here's a breakdown of the process:
Part 1: Update Nameservers at Cloudflare
1. Log in to your Cloudflare Account: Go to [https://dash.cloudflare.com/login](https://dash.cloudflare.com/login) and log in.
2. Select Your Domain: On your Cloudflare dashboard, find and click on the domain you wish to add to your hosting server.
3. Navigate to Nameservers: In the left-hand menu, click on DNS and then select Nameservers.
4. Find Your Hosting Provider's Nameservers: This is the most crucial step. You need to get the specific Nameservers provided by your hosting provider. You can usually find this information in:
* Your Welcome Email from your hosting provider: This is often the easiest place to find it.
* Your Hosting Account Control Panel (cPanel, Plesk, etc.): Log in to your hosting account and look for sections like "DNS," "Domain Management," "Account Information," or "Server Information."
* Your Hosting Provider's Support Documentation or Website: Search their knowledge base for "Nameservers" or "how to point your domain."
Common Hosting Provider Nameserver Formats:
* ns1.yourhostingprovider.com
* ns2.yourhostingprovider.com
* ns1.yourhostingcompany.net
* ns2.yourhostingcompany.net
* *(Some providers might have more than two nameservers.)*
5. Replace Cloudflare's Default Nameservers:
* On the Cloudflare Nameservers page, you'll see a list of Cloudflare's default nameservers.
* Click on the "Change Nameservers" button.
* Carefully enter your hosting provider's nameservers into the provided fields. Ensure you copy and paste them accurately to avoid typos.
* Click "Save" or "Continue."
6. Wait for Propagation: After changing nameservers, it takes time for these changes to propagate across the internet. This can take anywhere from a few minutes to up to 48 hours, though it's usually much faster. During this period, your domain might be inaccessible or still point to its old location if it was previously hosted elsewhere.
Part 2: Configure Your Hosting Server
Once the nameserver changes have propagated, your domain will start pointing to your hosting provider's servers. Now you need to tell your hosting server to actually host your website for that domain.
The exact steps will depend on your hosting provider's control panel (e.g., cPanel, Plesk, DirectAdmin, or a custom panel). Here's a general outline:
If you are using cPanel:
1. Log in to your cPanel Account: Access your cPanel usually via `yourdomain.com/cpanel` or a link provided by your host.
2. Find "Addon Domains" or "Domains": Look for a section labeled "Domains" or "Addon Domains."
3. Add Your Domain:
* Click on "Addon Domains."
* In the "New Domain Name" field, enter your domain name (e.g., `yourdomain.com`).
* Subdomain: This will usually auto-populate based on your domain name. You can generally leave it as is (e.g., `yourdomain.com`).
* Document Root: This is the directory on your server where your website files will be stored. cPanel usually creates a folder with your domain name (e.g., `/public_html/yourdomain.com`). You can adjust this if needed, but the default is often fine.
* Click "Add Domain."
If you are using Plesk:
1. Log in to your Plesk Account: Access your Plesk panel.
2. Find "Websites & Domains": Navigate to the "Websites & Domains" section.
3. Add a Website/Domain:
* Click on "Add Domain."
* Enter your Domain name.
* Web hosting (recommended): Ensure this is checked.
* Mail hosting: Check this if you want to use email addresses with your domain.
* Document root: This will usually be `httpdocs` or `public_html` by default relative to your domain's folder.
* Click "OK" or "Add Domain."
If you are using another control panel or a VPS/Dedicated Server without a GUI:
* VPS/Dedicated Server: You'll likely need to edit server configuration files (like Apache's `httpd.conf` or Nginx's virtual host files) to create a new virtual host for your domain. You'll also need to ensure your DNS zone file on the server is correctly set up with A records pointing to your server's IP address and potentially CNAME records. This requires more technical knowledge.
* Other Control Panels: Consult your hosting provider's documentation for their specific instructions on adding domains.
Important Considerations and Troubleshooting:
* SSL Certificates: Once your domain is active on your hosting server, you'll want to install an SSL certificate to enable HTTPS. Most hosting providers offer free Let's Encrypt certificates that can be easily installed through their control panel.
* DNS Records at Cloudflare: While you're pointing your nameservers to your host, you'll still manage your DNS records (A, CNAME, MX for email, etc.) within your Cloudflare dashboard. This is a key benefit of using Cloudflare. Your hosting provider might have a DNS management section, but for domains using Cloudflare nameservers, you *should* manage DNS within Cloudflare for full functionality.
* A Record: You'll typically need to create or update an A record in Cloudflare pointing to your hosting server's IP address. Your hosting provider will give you this IP address.
* CNAME Records: For `www` or other subdomains, you'll usually use CNAME records pointing to your main domain.
* MX Records: If you're using your hosting provider's email service, you'll need to configure MX records in Cloudflare to point to their mail servers.
* "This site can't be reached" or "DNS_PROBE_FINISHED_NXDOMAIN": This usually indicates a DNS propagation issue. Wait longer or double-check nameserver entries.
* "Account Not Found" or "Domain Not Configured": This means your hosting server hasn't been told to host the domain yet. Follow Part 2.
* Content Not Showing: Ensure you've uploaded your website files to the correct document root directory on your hosting server.
* Cache: Clear your browser cache or try accessing your domain from a different device or network if you're not seeing the expected results.
By following these steps, you should be able to successfully add your domain purchased on Cloudflare.com to your hosting server. Remember to consult your hosting provider's documentation if you encounter any specific issues.