How to add a parked domain in cPanel
Learn the exact steps to add a parked domain in cPanel. This guide covers creating a redirect, uploading a default page, and verifying the setup on cPanel 118.x.
You will add a parked domain to your cPanel account to redirect traffic to your primary site. These steps apply to cPanel 118.x and later versions. You will configure the redirect and upload a default page if needed.
Prerequisites
- Access to a cPanel account with root or reseller privileges.
- A primary domain already active on the account.
- The secondary domain name ready to be parked (e.g., example2.com).
- Internet connection to access the cPanel interface.
Step 1: Log in to cPanel
Open your web browser and navigate to your cPanel login URL, typically https://your-server-ip:2083. Enter your username and password to access the dashboard. You will see the main interface with various tools listed on the left.
https://your-server-ip:2083
Username: your_username
Password: your_password
Once logged in, ensure you are on the main home screen. If you see a maintenance mode or a login redirect, wait for the interface to fully load before proceeding.
Step 2: Navigate to the Domains section
Locate the Domains icon in the left-hand sidebar of the cPanel interface. Click on it to open the domain management tools. You will see options like Add Domain, Domains, Redirects, and Subdomains.
Click the Add Domain button. This opens a dialog box where you can enter the domain name you want to park. Ensure the domain is not already associated with another account on the server to avoid conflicts.
Step 3: Enter the parked domain name
In the Add a Domain dialog box, type the full domain name you want to park, such as example2.com. Do not include the www prefix unless that is the specific address you want to redirect. Leave the Subdomain field blank unless you are creating a subdomain.
Domain Name: example2.com
Subdomain: (leave blank)
Primary Domain: example.com (auto-filled)
Click the Add Domain button. You will receive a confirmation message stating the domain has been added. The system will automatically create a redirect file in the .public_html directory of your primary domain.
Step 4: Configure the redirect settings
After adding the domain, click the Domains icon again to view the list of all domains associated with your account. You will see the new domain listed under Parked Domains. Click the gear icon next to the domain name to access its settings.
In the settings menu, ensure the Redirect option is set to 301 Moved Permanently. This is the standard for SEO and ensures search engines update their indexes correctly. You can also choose 302 for temporary redirects if needed, but 301 is the default best practice.
Click Save to apply the changes. The system will update the configuration files immediately. You will see a success message confirming the redirect is active.
Step 5: Upload a default page (optional)
If you want to display a custom page instead of a standard cPanel message, access the File Manager from the cPanel sidebar. Navigate to the .public_html directory of your primary domain. Create a new folder named example2.com to store the parked domain's files.
Upload your HTML file, such as index.html, into this folder. The file should contain valid HTML5 code. For example, create a simple index.html with the following content:
Parked Domain
Welcome to example2.com
This is a parked domain.
Save the file and upload it to the .public_html/example2.com directory. If you do not upload a file, cPanel will show a default message indicating the domain is parked.
Verify the installation
Open a new browser tab and type the URL of the parked domain, for example, http://example2.com. You should see the redirect to your primary domain or the custom page you uploaded. Check the browser status bar to ensure the redirect is a 301 or 302 status code.
Use a tool like curl to verify the HTTP status code from the command line. Run this command in your terminal:
curl -I http://example2.com
The output should show HTTP/1.1 301 Moved Permanently. If you see a 200 OK, the redirect is working correctly and the content is being served from the correct directory.
Troubleshooting
If the redirect does not work, check the Domain Manager settings again. Ensure the domain is listed under Parked Domains and not under Subdomains. If the domain is missing, re-add it using the Add Domain tool.
Check the error_log file in the /usr/local/apache/logs directory to see if there are any PHP or server errors. Look for messages like 403 Forbidden or 500 Internal Server Error. If you see a 403 error, ensure the .public_html directory has the correct permissions (755) and the index.html file is readable.
Clear your browser cache and cookies. Sometimes the browser caches the old redirect or the default page. Try opening the domain in an incognito window to bypass cached data.
If you are using a custom SSL certificate, ensure the domain is included in the certificate's Subject Alternative Names (SAN). If not, the browser may show a security warning. Reissue the certificate with the parked domain included in the SAN list.
Check the cPanel Zone Editor to ensure there are no conflicting DNS records. Remove any A records or CNAME records that point to the wrong server. Ensure the domain points to the correct IP address of your hosting server.
If the issue persists, contact your hosting provider's support team. Provide them with the domain name and the specific error message you are seeing. They can check the server-side configuration files and resolve any backend issues.