Invalid SSL Certificate The Wierdest

I know there are so many questions about this problem but mine is the most weirdest…
My website sometimes gives the error “Invalid SSL Certificate” and sometimes it doesnt…
It gets me on my nerve when i know i am loosing traffic for this nonsense… i get reports from users that they are getting the same error… so its not device cache related… something else is …

Please if anyone with the knowledge of this reply i would highly appreciate it! :slight_smile:

What is your domain?

The error indicates a problem with your server configuration. Could you also share your IP address or pause Cloudflare on your site so we can see if your server configuration is correct?

Sure i just disabled cloudflare domain is


Ok, you can unpause it again. You have a valid certificate that covers the apex and www subdomain. Do you use any other subdomains like

When the error happens, is it only for some requests or are all requests affected for like a few minutes or so?


The error happens randomly… while browsing the site is actually subdomain
i do not have other sub sub domains

sometimes the error happens when you visit first time the website via phone …

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

# Custom 404 error page
ErrorDocument 404 /404.html

# Exclude real files and directories from rewriting
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Exclude resources directories
RewriteCond %{REQUEST_URI} !^/css/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_URI} !^/images/

# Prevent directory listing
Options -Indexes

# Remove .html extension (external redirect)
RewriteCond %{THE_REQUEST} \.html
RewriteRule ^(.+)\.html$ /$1 [L,R=301]

# Add .html extension internally
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+?)/?$ $1.html [L]

# Remove .php extension only for search.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/s/search$
RewriteRule ^(.+?)/?$ $1.php [L]

# Remove .php extension for poeni.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/poeni$
RewriteRule ^(.+?)/?$ $1.php [L]

# Remove .php extension for shop-checkout.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/shop-checkout$
RewriteRule ^(.+?)/?$ $1.php [L]

# Rewrite pretty URLs for the 'shop' folder
RewriteRule ^shop/([^/]+)/?$ shop/index.php?mainCategory=$1 [L,QSA]
RewriteRule ^shop/([^/]+)/([^/]+)/?$ shop/index.php?mainCategory=$1&subCategory=$2 [L,QSA]

# Rewrite product URLs
RewriteRule ^product/([^/]+)/([^/]+)/([^/]+)$ product/index.php?mainCategory=$1&productName=$2&product_id=$3 [L]

# Redirect non-www to www
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

# Redirect HTTP to HTTPS
#RewriteCond %{HTTPS} off
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
# php -- END cPanel-generated handler, do not edit

This is my htaccess file

when error occurs sometimes disapears after few seconds and sometimes it takes 2-3 mins

Is the error you see a Cloudflare error?

It would look like the screenshot in this post:

1 Like

It is not 526… this is the screenshot i am getting

Anyone with the knowledge please answer

The screenshot you posted indicated Error code 526 so follow the troubleshooting steps related to 526 errors to resolve the issue on your origin.

1 Like

I followed them… idk whats the problem i even called my hosting and they dont know why is occuring

Could you keep Cloudflare paused for a day and see if there are still any errors?

Can you please re-check your DNS record(s)?

One potential reason could be conflicting DNS records, as indicated in the quote above.

1 Like

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

I am still not able to fix the problem that i have with my website…
My website sometimes gives the error Invalid SSL Certificate and sometimes it doesn’t…

Please if you can tell me what should i change i would appreciate very much!

Here is a picture of my DNS in the cloudflare dashboard

526 is an error that the origin is returning an invalid certificate. If it is only doing it part of the time then something on your host is using an expired certificate part of the time.
You should follow

1 Like

Is there a chance you enter in my PC with any kind of program for that job and help me to fix it ? I am not so much informed and i really dont understand 90% of the things… i am too scared if i mess something up… and i have traffic on my website right now … i will loose money and also traffic if i mess something.
Please if you can do this for me!?