Skip to content

Domains

In cPanel, you can add and manage domains assigned to your hosting account.

This section covers:

  • adding a new domain,
  • selecting the website directory,
  • checking the Document Root,
  • removing a domain,
  • enforcing HTTPS,
  • the most common problems after adding a domain.

Where to manage domains

After logging in to cPanel, go to:

cPanel
→ Domains
→ Domains

You will see a list of domains assigned to the account.

The table includes information such as:

  • domain name,
  • Document Root,
  • redirect information,
  • the Force HTTPS Redirect option,
  • the Manage button.

Adding a new domain

To add a domain:

  1. log in to cPanel,
  2. go to:
Domains
→ Domains
  1. click:
Create a New Domain
  1. enter the full domain name in the domain field.

Example:

example.pl

Do not enter:

https://example.pl

Also do not enter:

www.example.pl

if you want to add the standard main domain example.pl.

Correct value:

example.pl

Document Root

The Document Root is the directory from which the web server reads files for a given domain.

Example:

public_html/example.pl

If the domain Document Root is:

public_html/example.pl

then the file:

public_html/example.pl/index.php

will be available as:

https://example.pl/

Separate directory for a new domain

If the new domain should display its own independent website, it should have its own Document Root.

Example:

public_html/example.pl

Do not share a Document Root unless necessary

If the new domain should display a different website from the primary domain, do not assign the same directory as the primary domain.

Otherwise, both domains may display the same content.

Share Document Root

When creating a domain, cPanel may display the option:

Share document root

If you enable it, the new domain will use the same directory as the selected domain.

Example:

example.pl
firma.pl

may then display the same website.

If the domain should have its own website, leave Document Root sharing disabled and specify a separate directory.

Share Document Root is an important decision

Enable this option only if you intentionally want two domains to display the same content.

Creating the domain

After checking the domain name and directory, click:

Submit

After a moment, the domain should appear in:

Domains
→ Domains

Adding the domain alone is not enough

Adding a domain in cPanel does not automatically make the domain work on the Internet.

You also need to configure DNS.

In Cloud4You, DNS is not managed from cPanel.

Go to:

https://panel.cloud4you.pl

and configure the domain DNS zone.

Cloud4You DNS servers

If the domain uses Cloud4You DNS, the nameservers are:

cns1.cloud4you.pl
cns2.cloud4you.pl

Domain delegation is changed at the registrar where the domain is registered.

cPanel is not used to manage DNS in Cloud4You

Edit DNS records in the Customer Panel:

https://panel.cloud4you.pl

Domain A record

Each Cloud4You hosting account has a dedicated IP address.

The domain should point its A record to the IP address assigned to your hosting service.

Example:

example.pl      A      <dedicated IP address>

If you also use www, configure an appropriate record for:

www.example.pl

This can usually be a CNAME record:

www.example.pl      CNAME      example.pl

or an A record pointing to the same IP address.

The exact DNS configuration is described in a separate documentation section.

DNS propagation

DNS changes are not always visible immediately.

Propagation time depends on factors such as:

  • TTL value,
  • local ISP cache,
  • operating system cache,
  • browser cache,
  • previous domain settings.

After a DNS change, the domain may continue to point to the previous server for some time.

How to check where the domain points

Windows

In PowerShell:

Resolve-DnsName example.pl

or:

nslookup example.pl

Linux

dig example.pl

or:

host example.pl

macOS

dig example.pl

The result should show the IP address assigned to your Cloud4You hosting service.

The website does not work after adding the domain

Check the following:

1. Is the domain added to cPanel?

Go to:

cPanel
→ Domains
→ Domains

and check whether the domain appears in the list.

2. Does DNS point to the correct IP address?

Check:

nslookup example.pl

or:

dig example.pl

3. Are there files in the Document Root?

Click the Document Root path next to the domain or go to:

Files
→ File Manager

Check whether the directory contains, for example:

index.html

or:

index.php

4. Are the files in the correct directory?

This is a very common mistake.

Example:

The domain uses:

public_html/example.pl

but the files were uploaded to:

public_html/

In this case, the domain will not display the correct website.

The files must be placed in the Document Root assigned to the domain.

Checking the Document Root

In:

cPanel
→ Domains
→ Domains

find the domain.

In the:

Document Root

column, you will see the directory used by the website.

You can click this path to open the appropriate directory in File Manager.

Changing the Document Root

If the function is available for the domain:

  1. go to:
cPanel
→ Domains
→ Domains
  1. next to the domain, click:
Manage
  1. change:
Document Root
  1. save the change.

Changing the Document Root does not move files

Changing the directory in the domain configuration does not automatically move the website files.

If you change:

public_html/stara

to:

public_html/nowa

you must move the files to the new directory yourself.

The Document Root of the account's primary domain cannot be changed in the same way as additional domains.

Subdomains

You can create a subdomain from the same Domains section.

Example:

sklep.example.pl

When creating the new domain, enter:

sklep.example.pl

and select an appropriate Document Root, for example:

public_html/sklep

Then remember to configure the appropriate DNS record.

Example:

sklep.example.pl      A      <dedicated IP address>

Domain alias

If you want two domains to display the same website, you can use the same Document Root.

Example:

example.pl
example.com

may point to the same content.

Do not use this configuration accidentally, because it can affect:

  • SEO,
  • SSL certificates,
  • CMS applications,
  • URLs generated by the website.

SSL certificate after adding a domain

Cloud4You uses AutoSSL with Let's Encrypt certificates.

After:

  1. adding the domain to cPanel,
  2. configuring DNS correctly,
  3. pointing the domain to the correct IP address,

the certificate may be issued automatically.

DNS first, SSL second

If the domain still points to another server, AutoSSL may not be able to validate it correctly.

Enforcing HTTPS

Once the domain has a valid SSL certificate:

  1. go to:
cPanel
→ Domains
→ Domains
  1. find the appropriate domain,
  2. find:
Force HTTPS Redirect
  1. set the switch to:
ON

From now on, requests to:

http://example.pl

will be redirected to:

https://example.pl

SSL certificate first

Enable Force HTTPS Redirect only after HTTPS works correctly for the domain.

Removing a domain

To remove an additional domain:

  1. go to:
cPanel
→ Domains
→ Domains
  1. next to the domain, select:
Manage
  1. use the domain removal option,
  2. carefully verify the domain name,
  3. confirm the operation.

Removing a domain may interrupt services

Before removing a domain, check whether it is used by:

  • a website,
  • email,
  • redirects,
  • certificates,
  • applications,
  • cron jobs,
  • external integrations.

Does removing a domain delete its files?

Do not assume that removing a domain automatically deletes its files.

cPanel removes the domain configuration, but the data directory may remain on the account.

After removing the domain, check File Manager before deleting any data manually.

Do not delete a directory blindly

The same directory may be used by another domain or may contain data that is still required.

Changing a domain name

If the cPanel interface provides a domain rename function, it can be found under:

Domains
→ Domains
→ Manage

Before changing the domain name, remember that changing it in cPanel alone may not be enough.

You may also need to change:

  • DNS,
  • application configuration,
  • the website address in the CMS,
  • email addresses,
  • the SSL certificate,
  • redirects,
  • links stored in the database.

For WordPress, changing the domain in cPanel does not automatically update all URLs stored in the WordPress database.

Redirecting a domain to another address

For redirects, use:

cPanel
→ Domains
→ Redirects

For example, you can create:

old-example.pl
        ↓
https://example.pl

For a permanent website address change, you will usually use:

301 Permanent

Do not confuse this with:

Force HTTPS Redirect

Force HTTPS Redirect only changes:

http://

to:

https://

for the same domain.

Typical correct domain setup

Step 1

Add the domain:

cPanel
→ Domains
→ Create a New Domain

Step 2

Set a separate Document Root, for example:

public_html/example.pl

Step 3

Go to:

https://panel.cloud4you.pl

and point the domain DNS to the dedicated hosting IP address.

Step 4

Upload the website files to:

public_html/example.pl

Step 5

Check:

https://example.pl

Step 6

After the SSL certificate has been issued, enable:

Force HTTPS Redirect

Step 7

If required by the application, select the correct PHP version.

Summary

When adding a domain, remember these three separate elements:

1. cPanel
   └── the domain must be added to the account

2. DNS
   └── the domain must point to the dedicated hosting IP

3. Files
   └── they must be located in the correct Document Root

If any of these elements is configured incorrectly, the website may not work.