Title: Weird caching issue
Last modified: December 9, 2022

---

# Weird caching issue

 *  Resolved Anonymous User 18617817
 * (@anonymized-18617817)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/weird-caching-issue-3/)
 * Hi there and thank you for your awesome Plugin!
 * I recently noticed Google Search Results for my page pointing to `https://my-
   domain.com/?`, and I’m wondering where the ? is coming from. I believe, it could
   be a caching issue:
 * I tried the following:
    – Purging the Cache and preloading. – I then visited `
   https://my-domain.com/?`, and the cached version of `https://my-domain.com/` 
   got updated.
 * Is that supposed to happen?
 * I’m using TranslatePress, which dynamically changes hreflang urls. So all subsequent
   visitors receive a (cached) homepage where the hreflang urls look like this: `
   https://my-domain.com/{lang_id}/?`.
 * I’ve no idea how to get rid of this ?. Any help would be greatly appreciated!
    -  This topic was modified 3 years, 5 months ago by Anonymous User 18617817.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fweird-caching-issue-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/weird-caching-issue-3/#post-16276035)
 * The ? is a query string. After the question mark you can pass key-value pairs
   and use them server-side.
 * Here is a guide that you should find helpful;
 * [https://sitechecker.pro/site-audit-issues/query-string-contains-question-mark/](https://sitechecker.pro/site-audit-issues/query-string-contains-question-mark/)
 *  Thread Starter Anonymous User 18617817
 * (@anonymized-18617817)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/weird-caching-issue-3/#post-16277604)
 * Thank you for your reply! I had a look at the link but it doesn’t solve my issue.
 * My question is getting more clear by replicating these steps:
 * 1.) Open a random page which is currently cached by WP-Optimize.
    2.) Look at
   the Source Code and find the comment at the bottom: <!– Cached by WP-Optimize(
   gzip) – [https://getwpo.com](https://getwpo.com) – Last modified: Sat, 10 Dec
   2022 17:39:56 GMT –> 3.) Manually add a /? to the url in the address bar and 
   press enter. 4.) Go back (remove the ? again), refresh and have a look at the
   last modified Date in the comment again. You will see, that the Date has changed.
 * Why would that happen? Am I missing something? WP-Optimize doesn’t cache urls
   with Query Strings. Why does a single question mark cause the cache to be modified,
   when a full Query String like ?a=b does not?
    I may be totally wrong, but I think
   this behaviour might be the root cause for my little url problem mentioned above.
 * Again, thanks for taking your time!
 *  Plugin Contributor [Venkat Raj](https://wordpress.org/support/users/webulous/)
 * (@webulous)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/weird-caching-issue-3/#post-16281095)
 * @boardingfk Yes, I can confirm that this is a bug and will be solved in our next
   release. However, I’m wondering how a URL with `?` is ended up in google search
   results
 *  Thread Starter Anonymous User 18617817
 * (@anonymized-18617817)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/weird-caching-issue-3/#post-16282838)
 * Sounds great, thanks!
 * So my theorie goes like this:
    1.) Someone visited our homepage with an `/?` 
   at the end of the url. 2.) Translatepress plugin looks at the url and changes
   the href attributes in the link-Elements accordingly:
 *     ```
       <link rel="alternate" hreflang="de" href="https://www.mydomain.com/?"/>
       <link rel="alternate" hreflang="en" href="https://www.mydomain.com/en/?"/>
       ```
   
 * 3.) The html file is then cached by WP-Optimize and served to all subsequent 
   visitors of our homepage, including GoogleBot.
    4.) Google uses the urls from
   the link-Elements in the search results.
 * Hope the next update of WP-Optimize will prove me right! 😉
 *  Plugin Contributor [Venkat Raj](https://wordpress.org/support/users/webulous/)
 * (@webulous)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/weird-caching-issue-3/#post-16288256)
 * @boardingfk Patch has been applied and will be available in version 3.2.11

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Weird caching issue’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Venkat Raj](https://wordpress.org/support/users/webulous/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/weird-caching-issue-3/#post-16288256)
 * Status: resolved