Wont redirct to https:// no matter what I do.

360webfirm

Well-Known Member
Oct 5, 2016
94
10
58
Ottawa
cPanel Access Level
Root Administrator
Good day all you fellow C panel patrons. I have a weird issue which I have never experienced while using c panel and WordPress in the last 10 years.


I have a website that has been set up for a few years on a c panel VPS server. Just recently, the site wont redirect from www.site.com or http://site.com to https://. The site works perfect if going to directly https://site.com. I did not change anything in WordPress and the site is set up correctly as I have done this time and time again and never had any issues like this. htaccess file also shows set up correctly and in c panel, under SSL, all green, and domains shows on for force ssl.

I have tried everything, when going to the site via http or www.site.com, it shows default c panel page.

SORRY!

If you are the owner of this website, please contact your hosting provider: [email protected]
It is possible you have reached this page because:

No issues or errors showing in WHM or even WordPress, everything I can do to redirect I have tried. Not cache issue either as I did everything IO could with this as well such as deleting cache, folder, different browser, etc. I am really stumped. DNS shows no errors, just weird and I really need one of you smart people to help me please.

Thanks,

Steve
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
455
218
118
IN
cPanel Access Level
Root Administrator
Based on the information shared I would start by checking the ping response for the site.com and www.site.com is from the same IP address. From my experience, many times I have found client points site.com to the correct IP but www.site.com points to some other IP.
 
  • Like
Reactions: cPRex

360webfirm

Well-Known Member
Oct 5, 2016
94
10
58
Ottawa
cPanel Access Level
Root Administrator
same IP, just pinged. I just set up a new domain on another account for testing in c panel and all works perfect. This is really getting me so stressed as I have been on this for 6 hours and c panel responsed once several hours ago, and nothing since and I sent over several replies. Not sure whats up with that, but not very happy with the service and I have 10 servers with these guys.

I checked permissions to htaccess and home dir, all good. Not sure wkat else to do, as I have never seen this before.
 

360webfirm

Well-Known Member
Oct 5, 2016
94
10
58
Ottawa
cPanel Access Level
Root Administrator
just to note, the ONLy thing I did a week ago was add an addon domain to same c panel account, this add on domain works fine, but main domain for that one c panel account just wont work unless directly going to https://. Someone will really make my day if they can help me figure this out. Not a very good easter trying to fix a clients site. :(
 

andrew.n

Well-Known Member
Jun 9, 2020
903
338
63
EU
cPanel Access Level
Root Administrator
So a couple of questions here:

1. In WordPress under General Settings what is the exact site URL you have set?
2. Please ping www.site.com and site.com as @kodeslogic suggested then compare the IP addresses with what you see in WHM under List Accounts
3. If they are the same go to Change Site's IP and re-apply the IP for the same account.
4. Do you use Nginx, LiteSpeed or any other plugins beside the default Apache on the server?
5. Try to rebuild Apache config with: /scripts/rebuildhttpdconf then restart Apache
6. Have you flushed cache and tried to visit the site from Incognito mode?
 
  • Like
Reactions: Spirogg

Spirogg

Well-Known Member
Feb 21, 2018
700
155
43
chicago
cPanel Access Level
Root Administrator
Try to rebuild Apache config with: /scripts/rebuildhttpdconf then restart Apache
I think this should work as @andrew.n has pointed out... above
or
From the command line:
/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd
or
/scripts/rebuildhttpdconf
service httpd restart

also are you using dns1 dns2 could anyone of your dns have been changed? when you added the add on domain does it use the same IP ans your domain reg domain.
do you have another ns1 dns2 for the add on domain ? could check if all is ok with your registrar as well.
 

Spirogg

Well-Known Member
Feb 21, 2018
700
155
43
chicago
cPanel Access Level
Root Administrator