Title: Using this plugin with GSC
Last modified: August 9, 2024

---

# Using this plugin with GSC

 *  [mishash](https://wordpress.org/support/users/mishash/)
 * (@mishash)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/using-this-plugin-with-gsc/)
 * Hello,
 * For a very long time, I was using a very old version of this plugin (3.4.1) and
   disabled auto updates for this plugin as, with this version, it was possible 
   to generate static XML sitemap and easily submit it to Google Search Console.
   This old version worked flawlessly! However, after upgrading my site to PHP8.2,
   the old version no longer worked and I had no choice but to upgrade to the latest
   version of the plugin (4.1.21).
 * (I have dynamic PHP site with the WordPress blog in /wpblog folder)
 * When I look at the plugin settings page, I see the following text there:
 * **The URL to your sitemap index file is: [https://www.[mysite].com/wpblog/sitemap.xml](https://www.[mysite].com/wpblog/sitemap.xml).**
 * However, when I navigate to this page, I get 404 error. I then noticed these 
   instructions:
 * Since you are using Nginx as your web-server, please configure the following 
   rewrite rules in case you get 404 Not Found errors for your sitemap:
 * `rewrite ^/.*-misc?\.xml$ "/index.php?xml_sitemap=params=$2" last;
   rewrite ^/.*-
   misc?\.xml\.gz$ "/index.php?xml_sitemap=params=$2;zip=true" last;rewrite ^/.*-
   misc?\.html$ "/index.php?xml_sitemap=params=$2;html=true" last;rewrite ^/.*-misc?\.
   html\.gz$ "/index.php?xml_sitemap=params=$2;html=true;zip=true" last;rewrite 
   ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.xml$ "/index.php?xml_sitemap=params
   =$2" last;rewrite ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.xml\.gz$ "/index.
   php?xml_sitemap=params=$2;zip=true" last;rewrite ^/.*-sitemap.*(?:\d\{1,4\}(?!-
   misc)|-misc)?\.html$ "/index.php?xml_sitemap=params=$2;html=true" last;rewrite
   ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.html\.gz$ "/index.php?xml_sitemap
   =params=$2;html=true;zip=true" last;
 * Hence, I asked the hosting company to apply these rewrite rules. When these rules
   were applied, instead of the XML sitemap or 404 error page, when I navigate to
   [https://www.[mysite].com/wpblog/sitemap.xml](https://www.[mysite].com/wpblog/sitemap.xml)
   I am now being redirected to the following URL: **[https://www.[mysite].com/wpblog/wp-sitemap.xml](https://www.[mysite].com/wpblog/wp-sitemap.xml)**,
   which, by some strange reason, displays blog homepage instead of the XML sitemap.
 * Needless to say, that either submission (i.e. of [https://www.[mysite].com/wpblog/sitemap.xml](https://www.[mysite].com/wpblog/sitemap.xml)
   or [https://www.[mysite].com/wpblog/wp-sitemap.xml](https://www.[mysite].com/wpblog/wp-sitemap.xml))
   to Google Search Console (GSC) results in “Couldn’t fetch” error.
 * Any explanations/recommendations?

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

 *  Thread Starter [mishash](https://wordpress.org/support/users/mishash/)
 * (@mishash)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/using-this-plugin-with-gsc/#post-17943955)
 * Correction to the original post:
 * When rewrite rules eventually took effect, I am now seeing the sitemap.xml page
   that looks like this:
 * [https://www.[mysite]/wpblog/sitemap-misc.xml](https://www.[mysite]/wpblog/sitemap-misc.xml)
   2024-08-09T17:31:23+00:00
   [https://www.[mysite]/wpblog/externals-sitemap.xml](https://www.[mysite]/wpblog/externals-sitemap.xml)
   2024-08-09T17:31:23+00:00[https://www.[mysite]/wpblog/post-sitemap.xml](https://www.[mysite]/wpblog/post-sitemap.xml)
   2024-08-09T17:31:23+00:00[https://www.[mysite]/wpblog/page-sitemap.xml](https://www.[mysite]/wpblog/page-sitemap.xml)
   2023-08-21T17:50:19+00:00
 * However, when I click on either of these 4 submaps, I get page not found error.
   And when I submit the [https://www.[mysite]/wpblog/sitemap.xml](https://www.[mysite]/wpblog/sitemap.xml)
   to Google Search Console, it shows 0 discovered pages.
 *  Plugin Author [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/using-this-plugin-with-gsc/#post-18086902)
 * Are all of the requests for your sitemaps 200 or 404s?

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

The topic ‘Using this plugin with GSC’ is closed to new replies.

 * ![](https://ps.w.org/google-sitemap-generator/assets/icon-256x256.png?rev=2713572)
 * [XML Sitemap Generator for Google](https://wordpress.org/plugins/google-sitemap-generator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-sitemap-generator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-sitemap-generator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-sitemap-generator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-sitemap-generator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-sitemap-generator/reviews/)

## Tags

 * [Google Search Console](https://wordpress.org/support/topic-tag/google-search-console/)
 * [GSC Error](https://wordpress.org/support/topic-tag/gsc-error/)
 * [sitemap](https://wordpress.org/support/topic-tag/sitemap/)

 * 2 replies
 * 2 participants
 * Last reply from: [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/using-this-plugin-with-gsc/#post-18086902)
 * Status: not resolved