Building a site for client w/ different hosting

zedsweb

Registered
Sep 10, 2018
2
0
1
Saskatoon
cPanel Access Level
Reseller Owner
Hi everyone,

Two questions for you today. But first a little background: I offer web design + web hosting packages to businesses. With every web hosting package I offer an SSL certificate that is installed through Let's Encrypt SSL. Up until now I've always had the design clients also using my hosting so it is very straight forward with setting up their cPanel accounts. I've recently had 2 new clients come in, both have domains & hosting set up through GoDaddy, and do not need my hosting. One of them has purchased an SSL certificate through GoDaddy already, and the other does not currently have one

First question:

For the client that does not have an SSL currently I want to create a cPanel account with WordPress + Lets Encrypt SSL installed. Initially when creating the cPanel account I thought all I had to do was click 'Use the nameservers specified at the Domain's Registrar. (Ignore locally specified nameservers)' and I would be able to set everything up like usual. I contacted my web hosting providers support staff and they told me if I want to set up Let Encrypt SSL the client's A record needs to be changed to the IP address of my server. Essentially the workflow would be:

  1. Client's A record gets changed through client's hosting account to my server's IP address
  2. Install WP, Lets Encrypt & build site
  3. Backup cPanel and restore on client's hosting account
  4. Change A record back to appropriate address
I would like to confirm with you guys if this is indeed the way it has to be done. Ideally I wouldn't have to access the client's web hosting account and all I would have to do is send a cPanel account for them to restore on their account. However, it sounds like this isn't possible. Is this true?

Second question:

For the client that already has purchased an SSL certificate all I would be doing is creating a cPanel account and installing WordPress on it to build their site. When I'm setting up their cPanel account, do I have to go through with the same workflow listed above even though this one does not require an SSL certificate?

At the end of the day I want to minimize the amount of work I have to do in the client's web hosting account, so I would love to hear from you guys when it's necessary to do that. Thank you
 

sysnishit

Active Member
Aug 13, 2018
25
3
3
Internet
cPanel Access Level
Root Administrator
Hello,

You don't need to ask client to point A record to your server IP. Just add IP and domain in hosts file on your local PC so site will resolve through your server for your PC. Path to host file is C:\Windows\System32\drivers\etc\hosts . Once you add your server IP and site name in hosts file, ping domain from command prompt and you will find it is resolving from your server.

You need to open this hosts file in notepad as administrator.
 

zedsweb

Registered
Sep 10, 2018
2
0
1
Saskatoon
cPanel Access Level
Reseller Owner
Hello,

You don't need to ask client to point A record to your server IP. Just add IP and domain in hosts file on your local PC so site will resolve through your server for your PC. Path to host file is C:\Windows\System32\drivers\etc\hosts . Once you add your server IP and site name in hosts file, ping domain from command prompt and you will find it is resolving from your server.

You need to open this hosts file in notepad as administrator.

Thanks for replying @sysni****! A follow up question for you as this is very new to me:

Are you saying by doing this I will be able to install WP in the cPanel account, and have it work on my PC so I can create the site, and then when complete finished all I have to do is back it up and have them restore the backup?

EDIT: I just change the hosts file to include our server address with the client's domain name. I then created a cPanel account & installed WordPress. I went to the admin link for the site and still shows I cannot access it. Any help would be greatly appreciated, thank you!
 
Last edited:

Anupam SG

Active Member
Aug 29, 2018
44
17
8
Earth
cPanel Access Level
Root Administrator
There are multiple ways to go about it. However, the most convenient(without compromising security aspect) is in both the scenarios you can install the SSL certificate directly from cPanel after moving the site to the server.

Since you have not mentioned where your test sites are hosted, I'll assume it is on a cloud server, which is the more appropriate way to do it anyways. This is how I generally would do it, irrespective of whether a SSL exists or not:

1. Develop the site in the subfolder of the same directory of the live site[e.g. public_html/domain/testdirectory/ where public_html/domain is the location of the live domain]. If security is a concern, then use .htpasswd directive to secure the test folder.
2. Once development is complete, move the files to live directory and change wp-config, .htaccess entries accordingly.
3. In cPanel Add and install the SSL certificate. You can do this in Step 1 too, and access the HTTPS version of the test site itself at "domain dot com/testsite" subdirectory.

These steps should be applicable to both the scenario irrespective of whether SSL already exists or not; and saves the complication of restoring backups with the advantage that you are developing on the live server itself, hence chances of mis-configuration with server OS and hardware are minimal as well.