HTTPS only homepage loading

My domain is: hostitor.com

I ran this command: sudo apachectl configtest

It produced this output: Syntax OK

Again, I ran this command: sudo apachectl -S

It produced this output:
VirtualHost configuration: *:443 hostitor.com (/etc/apache2/sites-enabled/hostitor.com-le-ssl.conf:2) *:80 hostitor (/etc/apache2/sites-enabled/hostitor.com.conf:1) ServerRoot: "/etc/apache2" Main DocumentRoot: "/var/www/html" Main ErrorLog: "/var/log/apache2/error.log" Mutex default: dir="/var/run/apache2/" mechanism=default Mutex mpm-accept: using_defaults Mutex watchdog-callback: using_defaults Mutex rewrite-map: using_defaults Mutex ssl-stapling-refresh: using_defaults Mutex ssl-stapling: using_defaults Mutex ssl-cache: using_defaults PidFile: "/var/run/apache2/apache2.pid" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG User: name="www-data" id=33 Group: name="www-data" id=33

My web server is (include version):

Server version: Apache/2.4.29 (Ubuntu)
Server built: 2020-03-13T12:26:16

The operating system my web server runs on is (include version): Ubuntu 18.04

My hosting provider, if applicable, is: AWS

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot) : certbot 0.31.0

Problem
My website is loading the SSL version of homepage well, but while trying to open other pages, it doesn’t work. I get 404 error but the same page is opening well in HTTP version. So, it is not opening only in HTTPS version. Also I’m using WordPress and mentioned problem in their forum and they said the problem might be from SSL itself. I’m not finding any problem yet except the fact that HTTPS version of other webpages are not opening. I’ll really appreciate if someone helps with this.

Hi @saumyabratadutt

I don’t understand that. Do you have a sample?

Checking your domain most looks ok - https://check-your-website.server-daten.de/?q=hostitor.com

Most of the a elements have https links.

Some images are wrong. No src-attribute, but

alt: https://hostitor.com/wp-content/uploads/2019/09/img-integration.png

alt attributes with links. alt attributes should describe the image.

Ah, I see, my parser isn’t good enough:

<img src = "https://hostitor.com/wp-content/plugins/bold-page-builder/img/blank.gif" 
data-image_src="https://hostitor.com/wp-content/uploads/2019/09/img-integration.png" 
alt="https://hostitor.com/wp-content/uploads/2019/09/img-integration.png" class="btLazyLoadImage">

Space between src, = and the attribute value.

But that’s not your description.

So, as you can see I can open the website https://hostitor.com but when I try to open any other page apart from homepage like - https://hostitor.com/about-us it doesn’t open. It gives a 404 error, you can try it from homepage too.

But the same page opens from http://hostitor.com/about-us, like without using SSL. (You might need to use incognito).

That’s

wrong.

Checking that url manual there is a redirect to https. Then follows the httpp status 404 - Not found.

If you see http://hostitor.com/about-us with content, that may be only your browser cache. Or you use an internal browser.

Checking that url - https://check-your-website.server-daten.de/?q=hostitor.com%2Fabout-us%2F

It’s the same:

Domainname Http-Status redirect Sec. G
http://hostitor.com/about-us/ 18.218.41.183 301 https://hostitor.com/about-us/ 0.426 A
http://www.hostitor.com/about-us/ 18.218.41.183 301 https://www.hostitor.com/about-us/ 0.410 A
https://hostitor.com/about-us/ 18.218.41.183 Inline-JavaScript (∑/total): 0/0 Inline-CSS (∑/total): 0/0 404 Html is minified: 100,00 % 3.806 M
Not Found
https://www.hostitor.com/about-us/ 18.218.41.183 Inline-JavaScript (∑/total): 0/0 Inline-CSS (∑/total): 0/0 404 Html is minified: 100,00 % 3.793 M

http has a redirect to https, there is a http status 404.

But that’s an internal problem of your website, not certificate relevant.

Your certificate is ok.

And it’s buggy: Your main page works, subdirectories not. May be you have a not working proxy or something else.

Thanks, now that you say I did forceful redirection to https, but when it was not done the http used to work fine, just https version would show 404.

So, this a problem with my website configuration?

Yes. And it’s curious. Your main page works. May be you have wrong rewrite rules. Or a WordPress-plugin that manages these urls

/about-us/ -> go there

that doesn’t work with https. But I don’t use WordPress -> ask there.

Just for the record, I can navigate your whole site without error and it is all being served via https://

Rip

Wordpress uses a “permalink section” in the settings tab that could affect this behaviour.
Rip

1 Like

Yep, now it works. But the links aren’t rewritten.

/about-us/ is now

https://hostitor.com/?page_id=16

Thanks @JuergenAuer

these are the options available in wordpress without additional plugins

Rip

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.