When a visitor comes to your WordPress site, their browser talks to your web server which loads up WordPress – this involves PHP processing, making requests to your database, sending files back to the browser to finally be assembled into a fully formed webpage. This can take several seconds – an eternity to modern web surfers.
The page caching feature which is activated automatically by default makes your site faster by removing the PHP and requests to the database and saving the content to HTML files. For each page, you'll find at least two files, depending on your settings.
Those files will be:
Basic Cache files
index.html- HTML page for websites with no SSL certificate, using HTTP
index-https.html- HTML page for websites with an SSL certificate, using HTTPS
index-https.html_gzip- The compressed HTML page in the gzip format.
Or depending on your WP Rocket settings, you may also see:
index-mobile-https.html- HTML page for mobile when the Separate Mobile Cache feature is enabled.
index-webp-https.html- HTML page for the WebP version when WebP Cache is enabled.
index-https-cookieValue.html- If the mandatory/dynamic cookies method has been used or you're using a plugin with automatic cookies compatibility, it's expected to see files named like this.
i.e: example from the Cookie Notice plugin
Each cached page on your site will have a dedicated folder with the cache files inside. You can find it going through the /cache/wp-rocket/your-domain.com/ folder, as shown below:
Once created, these files will be served to your visitors either by:
- Rewrite Rules in .htaccess or NGINX configuration for WP Rocket.
- PHP files which happens in some cases, e.g. when the Separate Mobile Cache feature is enabled the rewrite rules are removed from the .htaccess and the Cached files will be served running a small amount of PHP; The same goes for NGINX servers where the NGINX WP Rocket configuration hasn't been applied.
The full URL of the cached file (i.e: https://yourdomain.com/wp-content/cache/wp-content/your-domain/your-page-name/index-https.html.gzip) shouldn't appear directly to the visitor. If it does, check this guide for solutions: Resolve redirection to index_gzip.html issue
What about the SEO?
Even it's possible to visit these pages via the browser, like https://yourdomain.com/wp-content/cache/wp-content/your-domain/your-page-name/index-https.html - these pages shouldn't be a problem since the canonical tag will contain the correct URL for SEO purposes
If you're interested to know more about page caching, how it's preloaded, how often it's cleared, or how to disable the page caching, check the following articles out.