Sometimes users have the issue that all pages get 404 errors when Really Simple SSL is activated. The cause is different from user to user and from server to server.
Re-save the permalinks
Thought Really Simple SSL flushes the internal rewrite rules, it sometimes helps to do this again. You can find the permalinks in settings/permalinks. Re-saving makes sure the WordPress rewrite rules get flushed.
Photon from JetPack
Photon uses a CDN service to speed up loading for your images. When these image paths are changed, this might lead to issues. If you see the image paths are changed into wp1.com etc, try deactivating Photon.
.htaccess files in subdirectories
If you have .htaccess files in your media directories, remove them, or adapt them to the https domain.
Other redirecting plugins
Check also if you have a multilanguage plugin, security, caching or redirect plugins active. These especially multilanguage plugins often have strange effects when the url has changed. Deactivate them, or re-save the settings, to flush the internal redirect rules of these plugins.
Security on your server
Check if you have hot link protection activated.
NGINX server settings
If you are on NGINX, there can be a different cause. Adding the following lines to the httpd-ssl.conf file often solves the issue.
<Directory C:/www-base/ >
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory C:/www-base/site-dir >
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
This is a typical server configuration issue, so you might have to contact your hosting provider to fix it.
6 Responses
My WordPress site got recently hacked, and thousands of ‘fake’ pages are now indexed. After the fix they give a 404 so that’s good. However, I upgraded my site to SSL and now I don’t want to redirect my http:// 404 pages to https:// 404. Is it possible with .htaccess to only redirect https if the page is NOT a 404?
Unfortunately this doesn’t work:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_FILENAME} !404\.php$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteBase /
Do you have any suggestion? Thanks!
Hi Honza,
I don’t see why a 404 page can’t redirect to a https 404 page. A 404 is 404, so for SEO purposes I don’t see why you would want to exclude it. Search engines will drop those pages soon enough, if the 404 comes in. But if you are sure, you could try something like:
RewriteCond %{ENV:REDIRECT_STATUS} !=404
Hi,
I was wondering if someone could suggest a solution here as I’m at a loss. I switched to SSL more than a month ago, followed all the steps, installed Really Simple SSL plugin, resubmitted new Sitemaps to Seach Console, all done. I disappeared from Google (which is apparently normal after switching) but now Google Search Console is showing 1.5k 404 errors on my website, as if there was something wrong with all the images I ever uploaded. But when I open every blog post all images are there and seem to be fine. I have no idea what to do. I went to Settings/Permalinks and re-saved the settings but it didn’t work 🙁
Hi,
can you give an example of a link that is working on your site but results in a 404 error in Search Console? Have you tried to let Google recrawl the site?
Mark
Hi,
The above given solutions are applicable if the wp-admin is available.
I am getting a 404 error and unable to start wp-admin panel too.
Any solution for this issue?
Much thanks in anticipation.
Hi Mudassir,
it sounds like there may be something going wrong on the server level, perhaps the https:// site points to a different folder on the server and therefore https:// requests result in a 404 error. If the above solutions didn’t help I’d suggest to contact your hosting provider about this issue.
Mark