Status301 Premium https://premium.status301.com Premium WordPress Plugins and Support Wed, 18 Feb 2026 17:03:12 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://premium.status301.com/wp-content/uploads/2019/04/yes-128x128.png Status301 Premium https://premium.status301.com 32 32 81426866 Search Console says: “Couldn’t fetch” or “Sitemap could not be read” https://premium.status301.com/knowledge-base/xml-sitemap-google-news/search-console-says-couldnt-fetch-or-sitemap-could-not-be-read/ Wed, 18 Feb 2026 16:55:58 +0000 https://premium.status301.com/?p=46924

Continue reading →

]]>

This error message is very common when submitting your sitemap index for the first time. You will see no date under the “Last read column.” Normally, the error will disappear after Search Console has treated the sitemaps. Wait an hour and revisit your Search Console.

But if the error remains, visit your sitemap in your browser or check your news sitemap in an online XML validation tool like https://www.xml-sitemaps.com/validate-xml-sitemap.html. This may already provide you with some clues about what could be going wrong.

If there are errors reported that you do not understand or know how to fix, you can ask public support on https://wordpress.org/support/plugin/xml-sitemap-feed/.
If you’re a Google News Advanced user with an active license, get priority support on our Support Forum or Your account (after login) or create a support ticket via Priority support (provide your license key).

]]>
46924
Connect your site to Bing Webmaster Tools https://premium.status301.com/knowledge-base/xml-sitemap-google-news/connect-your-site-to-bing-webmaster-tools/ Sat, 17 Jan 2026 11:11:14 +0000 https://premium.status301.com/?p=46710

Continue reading →

]]>
Both for Bing Webmaster Tools reports on your sitemap status and for manual or automatic Sitemap Notification, a connection between your site and the Bing Webmaster Tools API needs to be created. This is a one-time setup that should remain active as long as the generated API key is not deleted from your Bing Webmaster Tools account. Only if you or a security plugin has changed WordPress Salts, you will need to reconfigure.

What’s needed?

Assuming you have your WordPress site and the XML Sitemaps & Google News free plugin installed and activated, there are a few more prerequisites to address:

  1. You need an account on Bing Webmaster Tools. In case you do not already have a Bing Webmaster account, sign up using any Microsoft, Google or Facebook ID.
  2. Your site property needs to be set up in Bing Webmaster Tools. If you have not already done that, follow the instructions on https://www.bing.com/webmasters/help/add-and-verify-site-12184f8b.

The connection between your site and Bing Webmaster Tools will be created in 2 stages.

Stage I. Create an API key

An API key1 can be generated from Bing Webmaster Tools by following the steps below:

  1. Sign in to your account on Bing Webmaster Tools.
  2. Click on Settings button on top right corner and then go to API Access section.
  3. If you are using API Access for the first time, please read and accept the Terms and Conditions displayed and then click on API Key. 
  4. Click on Generate API Key to create an API Key. Only one API key can be generated per user.
    Generate API key
  5. Click Copy to copy the API key and paste it in the API Key field in your WordPress Bing Webmaster Tools Connection admin page.
  6. Hit Save Changes in WordPress to finish stage 1.

Lost or compromised API key

 ⚠ Warning
Do not give out your API key to any 3rd party or anyone you do not trust.

If you feel that your API key has been compromised or is being used by an unauthorized party, you can create a new key after deleting your current one. Please go to Webmaster API page in Bing Webmaster Tools and click on Delete. Then, click on Generate to create a new API key. Note that on deleting your old API key, all applications tied to that key will no longer function and will have to be updated with the new API key.

Stage II. Test and activate the connection

After saving the API key in the previous stage, the connection will be tested for you. If an error is encountered, you will see this on the next page load. If the connection test is successful, you will see a short message:

The connection test was successful and the connection was activated!

You will be automatically redirected back to the plugin settings page.


Possible errors

Either the API key does not match your Bing Webmaster Tools account, your account has insufficient rights or your site property has not been set up and verified in Bing Webmaster Tools.

Verify if your site has been configured in Bing Webmaster Tools. If not, please do so as instructed on https://www.bing.com/webmasters/help/add-and-verify-site-12184f8b.

Then check your user access level to the site property under User management. Your Role should have Owner or Read-Write level.

If that did not solve the issue, you’ll need to reconfigure the plugin connection. Use the button Disconnect to start fresh.

The API key value that was entered does not seem to be a valid API Key value. You’ll need to reconfigure the plugin connection. Use the button Disconnect to start fresh and carefully copy/paste the API Key again.

This usually means that the connected Microsoft account has insufficient rights. Make sure to connect with an account that has at least Read-Write access to the site property in Bing Webmaster Tools.

This usually means the site property URL used in the API call was not found or does not match the property verified in Webmaster Tools.

  1. The API key is generated for a user and not a site and hence a user can use the same API key for all their verified sites on Bing Webmaster Tools. ↩︎
]]>
46710
Connect your site to Google Search Console https://premium.status301.com/knowledge-base/xml-sitemap-google-news/connect-your-site-to-google-search-console/ Mon, 01 Dec 2025 17:24:09 +0000 https://premium.status301.com/?p=46611

Continue reading →

]]>
Both for Google Search Console reports on your sitemap status and for manual or automatic Sitemap Notification, a connection between your site and the Google Search Console API needs to be created. This is a one-time setup that should remain active as long as you regularly post news on your site. Only if the connection is left unused for a long time, or if you or a security plugin has changed WordPress Salts, you might need to refresh or reconfigure.

What’s needed?

Assuming you have your WordPress site and the XML Sitemaps & Google News free plugin installed and activated, there are a few more prerequisites to address:

  1. Your site property needs to be set up in Google Search Console. If you have not already done that, follow the instructions on https://support.google.com/webmasters/answer/34592. It does not matter if you choose an URL-prefix or a Domain property.
  2. You’ll need a Google Cloud account. If you’re new to Google Cloud, go to https://docs.cloud.google.com/docs/get-started and create an account from there.

Note: Although not strictly necessary, it is will be easiest when both Google Cloud account and your site in Google Search Console are fully accessible with the same Google account.

The connection between your site and Google Search Console will be created in 3 stages.

Stage I. Create a Google Cloud Project

  1. Go Google Cloud Console and Create a new Cloud project.
  2. Go to API & Services > OAuth consent screen and Get started with basic setup of your project:
    • Give it a nice Name and select a Suport email address.
    • At Audience choose Internal if you have that option available (Workspace users) and if a member account of the same organization can/will be used for connecting to Google Search Console. Otherwise choose External.
    • Then finish until you hit Create.
  3. If you chose External during step 2 above, then go to API & Services > OAuth consent screen > Audience to Publish app. Note: Without that published status, you’ll run into an “Access Blocked” error later.
  4. Go to API & Services > Library, search for Google Search Console API and Activate.

Switching between Internal and External + Published status may always be done afterwards, but it needs careful consideration. Internal is easiest but only available to Workspace users and only useful if both Cloud user and Search Console user are from the same organization. Otherwise use External, but do not forget to Publish the app or you won’t be able to finish the connection.

Stage II. Create OAuth Credentials

  1. Go to APIs & Services > OAuth Consent Screen > Clients and click + Create client
  2. Choose Application type Web application, give it a recognizable name (or leave the default name) and click + Add URI under Authorized redirect URIs.
  3. In another browser tab, open your WordPress site, log in and go to Settings > Google News. Hit the Connect button on the right to open the Google Search Console Connection admin page.
  4. Copy the URL that is shown in the instructions there for Authorized redirect URIs and paste it in your Cloud Console. Finish with Create.
  5. From the confirmation popup window in Cloud Console, copy both the Client ID and Client Secret carefully to their corresponding fields in your WordPress Google Search Console Connection admin page.
  6. Hit Save Changes in WordPress to finish the configuration. On the next page load, there will be appear a button Connect to Google Search Console.

Stage III. Connect your site to Google Search Console

This final step can be completed with the same Google account as was used for Google Cloud, or by another Google account. As long as it has at least Full rights for (or Owner of) the site property in Google Search Console. Go to Google Search Console, select the property and look under Settings > Users and rights to verify and change rights if needed.

  1. In WordPress, go to Settings > Google News, hit the Connect button on the right to open the Google Search Console Connection admin page. If correctly configured per instructions above, there should be a Connect to Google Search Console button.
  2. Hit the Connect to Google Search Console. You’ll be directed to a Google login screen. Login as or Select the user with full rights to the property in Google Search Console.
  3. After possible extra verification (like code via text message) you should arrive at the consent screen with title “… wants access to your Google Account”
  4. Grant the required access to View and manage Search Console data for your verified sites and hit Continue.
  5. You’ll now be redirected back to your WordPress admin and your site should be connected.

Done!

Possible errors

If you encounter errors, some details in the setup process where likely skipped or gone wrong. Here are some possible errors and solutions.

]]>
46611
[Advanced] Automatically notify Google on news sitemap updates https://premium.status301.com/knowledge-base/xml-sitemap-google-news/automatically-notify-google-on-news-sitemap-updates/ Thu, 20 Nov 2025 05:34:56 +0000 https://premium.status301.com/?p=46463

Continue reading →

]]>
The Google News Advanced plugin for WordPress offers, since version 1.4, the option to send automatic notifications to Google on each news publication. This feature can be compared to Sitemap Pings, which was abandoned by Google in 2023.

Google Search Console connection

To allow automatic Sitemap Notification, a connection between your site and the Google Search Console API needs to be created. This is a one-time setup that should remain active as long as you regularly post news on your site. Only if the connection is left unused for a long time, you might need to refresh or reconfigure.

If you have not already created the connection, please follow the steps on Connect your site to Google Search Console

Activate automatic notifications

If all went well connecting your site, you can go to Settings > Google News > Advanced tab and activate the Sitemap notifier option. From then on, your news sitemap will get sent to Google on each news publication.

There is a Submit Now button for manual submission on the Google Search Console tab. You can keep track of the most recent notifications (successes and possible errors) in Log section.

Possible errors

If you encounter errors, some details in the setup process where likely skipped or gone wrong or your Google Cloud Project OAuth credentials expired or got corrupted. Here are some possible errors and solutions.

]]>
46463
Google Search Console connection errors https://premium.status301.com/knowledge-base/xml-sitemap-google-news/google-search-console-connection-errors/ Thu, 20 Nov 2025 05:06:32 +0000 https://premium.status301.com/?p=46460

Continue reading →

]]>

Possible errors at stage II, entering client data

When entering your client data, you may run into these warnings.

Your client secret was stored in the database without proper encryption. It is recommended to upgrade your server and resave the data.

Your hosting is using a PHP installation that was not compiled with the openssl flag. If you have the option to switch to another PHP version or reinstall PHP, please do so and then resave the connection data.

To encrypt and decrypt the client secret, the plugin uses the WordPress salts that are set in your wp-config.php file. It appears these values are missing.

Please go to https://api.wordpress.org/secret-key/1.1/salt/ and copy the presented content into your wp-config.php file. After you have done that, you’ll need to reconfigure your client data again.


Possible errors at stage III, authorization

You may encounter the following error messages during your setup of the site connection to Google Search Console. Click the + to read about their possible cause and solution.

Access blocked: Authorization Error
Error 400: invalid_request

or

Access blocked: This app’s request is invalid
Error 400: redirect_uri_mismatch


The Authorized redirect URI was not configured or not entered correctly.

Go to your Google Cloud Console project, APIs & Services > Credentials and select the OAuth 2.0 Client ID that was created for this site connection. Make sure that the URL that is shown after the text “The redirect URI for your Google Cloud Console OAuth 2.0 client configuration should be: …” in your WordPress admin (on the Google Search Console Connection page) is listed there under Authorized redirect URIs in Google Cloud Console.

It should match exactly, including http or https and www or non-www.

Failed to refresh Google access token (HTTP 401): Unauthorized

or

OAuth token exchange failed: Unauthorized


There was a mismatch between your Cloud Console Client ID and Client Secret or the Client Secret encryption/decryption went wrong. This can happen when the WordPress Salts were changed by you or by a security plugin.

If you saved your credentials after the initial creation in Google Cloud Console, then carefully copy/paste them both into the form fields again and hit Save Settings. Then try connecting again.

If the problem persists, or if you did not save your Client Secret somewhere, then you will have to create new credentials. Go to your Google Cloud Console project, APIs & Services > Credentials and select the OAuth 2.0 Client ID that was created for this site connection. Hit + Add secret to create a new Client Secret. You may disable and delete the old client secret for safety.

Access blocked: … has not completed the Google verification process
Error 403: access_denied

or

Access blocked: Project can only be used within its organization
Error 403: org_internal


In both cases, you are trying to finish the connection with another account than the one with which the Cloud project was created. This is possible but needs a little more tweaking and attention.

Go to the Google Cloud console, select the project and go to API & Services > OAuth Consent Screen and choose Audience.

  • If the User type is set to Internal here, then Make external and choose In production.
  • If the Publishing status is Testing here, then Publish app and Confirm.

Workspace users have the option to keep the app Internal if the account that will finish the site connection is a member of the same organization.

Google Search Console API has not been used in project … before or it is disabled

In your Cloud Console, with the correct Project selected, Go to API & Services > Library, search for Google Search Console API and Enable it. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

User does not have sufficient permission for site …

Go to Google Search Console, log in, go to the Settings > Users and rights under the relevant Property. Make sure the user that signed in during the Google Cloud Console authorization process is listed there and is either (Verified) Owner or has Full rights.

If you are not sure which user was used to finalize the connection, you can disconnect and reconnect your site, using an account that is listed with enough rights. Go to your WordPress admin Settings > Google News and click the button Disconnect from Google Search Console on the right. Then after the page reloads, click the button Connect and then follow the last step.

Google Search Console API has not been used in project … before or it is disabled.

Enable it by visiting the URL provided in the error description, then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry. Please ensure the connected Google account has full access to the Search Console property.

The requested URL was not found on this server. That’s all we know.


You are trying to connect with an OAuth Client ID that does not exist (anymore) on Google Cloud Console. Verify your credentials and maybe create new ones and configure them in the plugin settings again.

To return to the Stage I and II descriptions in your admin, remove the faulty Client ID and save settings. You’ll then be able to follow the steps again. Make sure to copy/paste the complete Client ID and Client secret.


Possible errors during API requests

Once the connection has been configured, you might run into the following error messages. Click the + to read about their possible cause and solution.

You either finalized (stage iii) the connection with an account that does not have sufficient rights to access the site property in Google Search Console, or the property is not fully set up in your Google Search Console.

Go to Google Search Console and select your site property. If it’s not yet configured or property ownership is not yet verified, complete the steps as given there to finish the property setup. Then, make sure the connected user account has full access to the property. Go to the property Settings > Users and rights. The user account that you wish to use for the site connection should have at least Full rights.

If you wish to change the user account that is used for the site connection, go in your WordPress admin to Settings > XML Sitemap. Use the Disconnect button to release the current connection. The Google Cloud projet settings will not be deleted and can be used to reconnect to Search Console with another account.

When fetching sitemap data for the first time, the plugin tries to find a matching domain property in Google Search Console. Something went wrong trying to determine the correct domain from the WordPress site/home URL.

If this happens, please contact us.

When the access token is about to expire, the plugin tries to get a fresh one using the refresh token that was obtained during the site connection. Something in this proces has gone wrong.

Refresh your page and if the error remains, you’ll need to Disconnect and reconnect your site to obtain a new refresh and access tokens.

Go to Google Search Console and select your site property. If it’s not yet configured or property ownership is not yet verified, complete the steps as given there to finish the property setup. Then, make sure the connected user account has full access to the property. Go to the property Settings > Users and rights. The user account that you wish to use for the site connection should have at least Full rights.

If your sitemap has not been submitted before, simply use the Submit your sitemap now button on the right to submit. The sitemap index data should then become available in your admin.

At first, the reported data may not fully correspond with your sitemap index. Please allow the search engine some time to process your sitemaps and update the reported data.


Did you encounter another error? Please let us know

]]>
46460
Sitemap Pings are back! https://premium.status301.com/news/sitemap-pings-are-back/ Tue, 18 Nov 2025 15:15:32 +0000 https://premium.status301.com/?p=46449

Continue reading →

]]>
In 2021, Google officially deprecated support for sitemap pinging via the URL https://www.google.com/ping?sitemap=. This decision reflected a shift in how search engines discover new content, with Google stating that it had improved its crawling and indexing algorithms to automatically detect changes in web content, thus eliminating the need for webmasters to manually notify Google of new sitemaps or updates. While this change simplified the process for many site owners, it also encouraged the use of alternative methods such as utilizing Google Search Console for indexing requests, ensuring that site owners still have tools at their disposal to manage their site’s visibility effectively.

What’s the alternative?

Both Google Search Console and Bing Webmaster Tools provide APIs that facilitate automated sitemap submission, effectively replacing the deprecated sitemap ping feature that was once a manual process. With these APIs, website owners and developers can programmatically inform search engines about updates to their sitemaps, ensuring that their content is indexed promptly and efficiently. This automation enhances the overall SEO strategy by streamlining the workflow for managing and submitting sitemaps, thereby improving site visibility and performance in search results.

The latest releases of the Google News Advanced and the XML Sitemap Advanced plugins for WordPress introduce an exciting feature: the Sitemap Notifier. This functionality re-establishes the possibility of XML Sitemap pings to Google and Bing via their respective API’s, enhancing how your site interacts with search engines.

Key Features of the Sitemap Notifier:

  1. Automatic Pinging:
    The Sitemap Notifier allows your site to automatically ping Google whenever your XML sitemap is updated. This ensures that search engines are always aware of the latest content on your site, which can help improve visibility and indexing speed.
  2. User-Friendly Setup:
    The setup process is straightforward with detailed description, providing a guided step-by-step approach to connect your site to the Google Search Console.
  3. Real-Time Updates:
    Once activated, the Sitemap Notifier sends real-time updates to Google, ensuring that any new articles or changes are promptly communicated, potentially leading to faster indexing.
  4. Enhanced SEO:
    By keeping search engines informed about your latest content, you can enhance your site’s overall SEO strategy, leading to improved rankings and increased traffic over time.

Conclusion

With the implementation of the Sitemap Notifier in the Google News Advanced plugin, WordPress users can take advantage of a significant enhancement to their site’s interaction with Google. This new feature promises to make managing your XML Sitemap more efficient and effective, ultimately contributing to better search engine optimization.

]]>
46449
xmlsf_news_stock_tickers https://premium.status301.com/knowledge-base/xml-sitemap-google-news/filter-hooks/xmlsf_news_stock_tickers/ Thu, 09 Oct 2025 01:02:53 +0000 https://premium.status301.com/?p=46310

Continue reading →

]]>
Filters the news stock tickers array in Google News Advanced. Passes the stock tickers array and $post_id; must return an array.

apply_filters( 'xmlsf_news_stock_tickers', array[] $stock_tickers, int[] $post_id )

Used in xml-sitemap-feed-advanced-news/inc/class-main.php

Parameters (2)

  • $stock_tickers
    (array) The news stock tickers array.
  • $post_id
    (int) The current post ID.

Return

  • (array) The news stock tickers array.

The filter should return an array with stock tickers for the current post.

Usage example

function my_custom_stock_tickers( $stock_tickers, $post_id ) {
	$post_stock_tickers = get_post_meta( $post_id, 'stock_ticker' );

	return array_merge( (array) $stock_tickers, $post_stock_tickers );
}
add_filter( 'xmlsf_news_stock_tickers', 'my_custom_stock_tickers' );

Related

Used byDescription
none
]]>
46310
FAQ’s and Troubleshooting the XML Sitemap https://premium.status301.com/knowledge-base/xml-sitemap-google-news/faqs-and-troubleshooting/ Wed, 26 Mar 2025 01:04:16 +0000 https://premium.status301.com/?p=45450 Frequently asked questions

On Settings > Reading you can enable the XML Sitemap Index and (if needed) the Google News Sitemap. There is also an Additional robots.txt rules field.

Once a sitemap is enabled, its options can be found on Settings > XML Sitemap or on Settings > Google News.

Since April 2024, it’s no longer possible to submit new sites to the Google News Publisher Center.

If your site is new, you can only:

Continue publishing quality content and wait for Google News to discover and distribute it.

Create quality news articles.

Submit your Google News sitemap to your Google Search Console account to check its validity and performance. Create an account if you don’t have one yet.

You can find default settings for Priority on Settings > XML Sitemap. A fixed priority can be set on a post by post basis too.

Changefreq has been dropped since version 4.9 because it is no longer taken into account by Google.

Not necessarily. In normal circumstances, your site will be indexed by the major search engines before you know it. The search engines will be looking for a robots.txt file and (with this plugin activated) find a pointer in it to the XML Sitemap on your blog. The search engine crawlers will return on a regular basis to see if your site has updates.

But you can submit your sitemap(s) in Google Search Console account, Bing Webmaster Tools, Yandex Webmaster and Baidu Webmaster Tools to monitor your site and sitemap performance.

In recent plugin versions there is an option to submit the sitemap to Bing and Google right from the admin.

NOTE: If you have a server without rewrite rules, use your blog without fancy URLs (meaning, you have WordPress Permalinks set to the old default value) or have it installed in a subdirectory, then read Do I need to change my robots.txt for more instructions.

The latest release of the plugin introduces the Sitemap Notifier. This functionality re-establishes the possibility of XML Sitemap pings to Google, enhancing how your site interacts with search engines. Read more on how to connect your site to Google Search Console and how to connect your site to Bing Webmaster Tools.

In normal circumstances, if you have no static robots.txt file in your site root, the new sitemap url will be automatically added to the dynamic robots.txt that is generated by WordPress.

If you use a static robots.txt file in your website root, you will need to open it in a text editor. If there is already a line with Sitemap: http://yourblogurl.tld/sitemap.xml you can just leave it like it is. But if there is no sitemap referrence there, add it (adapted to your site url) to make search engines find your XML Sitemap.

Or if you have WP installed in a subdirectory, on a server without rewrite_rules or if you do not use fancy URLs in your Permalink structure settings. In these cases, WordPress will need a little help in getting ready for XML Sitemap indexing. Read on in the WordPress section for more.

That depends on where the index.php and .htaccess of your installation reside. If they are in the root while the rest of the WP files are installed in a subdir, so the site is accessible from your domain root, you do not have to do anything. It should work out of the box.

But if the index.php is together with your wp-config.php and all other WP files in a subdir, meaning your blog is only accessible via that subdir, you need to manage your own robots.txt file in your domain root. It has to be in the root (!) and needs a line starting with Sitemap: followed by the full URL to the sitemap feed provided by XML Sitemap Feed plugin. Like:
Sitemap: http://yourblogurl.tld/subdir/sitemap.xml

If you already have a robots.txt file with another Sitemap reference like it, just add the full line below or above it.

No. While I would advise you to use any one of the nicer Permalink structures for better indexing, you might not be able to (or don’t want to) do that. If so, you can still use this plugin:

Check to see if the URL yourblog.url/?feed=sitemap does produce a feed. Now manually upload your own robots.txt file to your website root containing:
`
Sitemap: http://yourblog.url/?feed=sitemap

User-agent: *
Allow: /
`
You can also choose to notify major search engines of your new XML sitemap manually. Start with getting a Google Search Console account and submit your sitemap for the first time from there to enable tracking of sitemap downloads by Google! or head over to XML-Sitemaps.com and enter your sites sitemap URL.

Only with the XML Sitemap Advanced extension.

If you have fancy URL’s turned ON in WordPress (Permalinks), the sitemap url is yourblogurl.tld/wp-sitemap.xml or yourblogurl.tld/sitemap.xml depending on the XML Sitemap Server option. But if you have the Permalink Plain option set, the XML Sitemap is only available via yourblogurl.tld/?feed=sitemap.

Yes. In fact, it has been designed for it. Tested on WPMU 2.9.2 and WPMS 3+ both with normal activation and with Network Activate / Site Wide Activate.

Troubleshooting

There are several cases where this might happen.

Open your sitemap in a browser and look at the source code. This can usually be seen with the key combination Cmd/Ctrl+U or right click then select ‘View source…’ Then scan the produced source (if any) for errors.

A. If you see strange output in the first few lines (head tags) of the source, then there is a conflict or bug occuring on your installation. Please go to the Support forum for help.

B. If the source is empty or incomplete then you’re probably experiencing an issue with your servers PHP memory limit. In those cases, you should see a messages like PHP Fatal error: Allowed memory size of xxxxxx bytes exhausted. in your server/account error log file.

This can happen on large sites. To avoid these issues, there is an option to split posts over different sitemaps on Settings > XML Sitemap. Try different settings, each time revisiting the main sitemap index file and open different sitemaps listed there to check.

Read more on Increasing memory allocated to PHP (try a value higher than 256M) or ask your hosting provider what you can do.

There is no actual file created. The sitemap is dynamically generated just like a feed.

You are most likely looking at a sitemap.xml file that has been created by another XML Sitemap plugin before you started using this one. Remove that file and let the plugin dynamically generate it just like a feed. There will not be any actual files created.

If that’s not the case, you are probably using a caching plugin or your browser does not update to the latest feed output. Please verify.

The sitemaps are designed to NOT be cached. This is done to make sure search engines will always get a fresh sitemap.

The absolute first thing you need to check is your blogs privacy settings. Go to Settings > Privacy and make sure you are allowing search engines to index your site. If they are blocked, your sitemap will not be available.

Then, you might want to make sure that there is at least ONE post published. WordPress is known to send 404 status headers with feed requests when there are NO posts. Even though the plugin tries to prevent that, in some cases the wrong status header will get sent anyway and Google Search Console will report a vague message like:

We encountered an error while trying to access your Sitemap.
Please ensure your Sitemap follows our guidelines and can be
accessed at the location you provided and then resubmit.

If that did not solve the issue, check the following errors that might be encountered along with their respective solutions:

404 page instead of my sitemap.xml

Try to refresh the Permalink structure in WordPress. Go to Settings > Permalinks and re-save them. Then reload the XML Sitemap in your browser with a clean browser cache. ( Try Ctrl+R to bypass the browser cache — this works on most but not all browsers. )

404 page instead of both sitemap.xml and robots.txt

There are plugins like Event Calendar (at least v.3.2.beta2) known to mess with rewrite rules, causing problems with WordPress internal feeds and robots.txt generation and thus conflict with the XML Sitemap Feed plugin. Deactivate all plugins and see if you get a basic robots.txt file showing:
User-agent: * Disallow:
Reactivate your plugins one by one to find out which one is causing the problem. Then report the bug to the plugin developer.

404 page instead of robots.txt while sitemap.xml works fine

There is a known issue with WordPress (at least up to 2.8) not generating a robots.txt when there are no posts with published status. If you use WordPress as a CMS with only pages, this will affect you.

To get around this, you might either at least write one post and give it Private status or alternatively create your own robots.txt file containing:
`
Sitemap: http://yourblog.url/sitemap.xml

User-agent: *
Allow: /
`
and upload it to your web root…

Error loading stylesheet: An unknown error has occurred

On some setups (usually using the WordPress MU Domain Mapping plugin) this error may occur. The problem is known, the cause is not… Until I find out why this is happening, please take comfort in knowing that this only affects reading the sitemap in normal browsers but will NOT affect any spidering/indexing on your site. The sitemap is still readable by all search engines!

XML declaration allowed only at the start of the document

This error occurs when blank lines or other output is generated before the start of the actual sitemap content. This can be caused by blank lines at the beginning of wp-config.php or your themes functions.php or by another plugin that generates output where it shouldn’t. You’ll need to test by disabling all other plugins, switching to the default theme and manually inspecting your wp-config.php file.

]]>
45450
xmlsf_index_archive_data https://premium.status301.com/knowledge-base/xml-sitemap-google-news/filter-hooks/xmlsf_index_archive_data/ Fri, 15 Mar 2024 18:45:06 +0000 https://premium.status301.com/?p=43214

Continue reading →

]]>
Filters the post type sitemaps in XML Sitemap Index context when the sitemaps Server is set to Plugin.

apply_filters( 'xmlsf_index_archive_data', array[] $data , string[] $post_type, string[] $archive_type )

Used in xml-sitemap-feed/views/feed-sitemap.php

Parameters (3)

  • $data
    (array) The original set of sitemaps. An array of URL and lastmod date pairs.
  • $post_type
    (string) The post type, one of:  post|page or a custom post type slug.
  • $archive_type
    (string) The current archive type, one of: yearly|monthly|weekly

Return

  • (array) An array of URL and lastmod date pairs.

Must return an array of URL and lastmod date pairs. When hooked before priority 10, the original $data will be empty.

Usage example

function my_remove_old_sitemaps( $data, $post_type = 'post', $archive_type ) {
	if ( 'post' !== $post_type || empty( $archive_type)  ) {
		return $data;
	}

	// Set year archive sitemaps to remove.
	$remove = array( '2009', '2010', '2011', '2012', '2013', '2014', '2015', '2016', '2017', '2018', '2019' );

	foreach ( $data as $d_key => $d_value ) {
		foreach ( $remove as $year ) {
			if ( strpos( $d_key, '.' . $year ) ) {
				unset( $data[ $d_key ] );
			}
		}
	}

	return $data;
}

add_filter( 'xmlsf_index_archive_data', 'my_remove_old_sitemaps', 11, 3 );

Related

Used byDescription
Sitemap_Plugin::index_archive_data()Fetches post archives data from cache or database.
]]>
43214
xmlsf_entry_url https://premium.status301.com/knowledge-base/xml-sitemap-google-news/filter-hooks/xmlsf_entry_url/ Tue, 12 Mar 2024 13:47:52 +0000 https://premium.status301.com/?p=43165

Continue reading →

]]>
Filters the entry URL in XML Sitemap context when the sitemaps Server is set to Plugin.

apply_filters( 'xmlsf_entry_url', string[] $url , string[] $sitemap, obj[] $object )

Used in xml-sitemap-feed/views/feed-sitemap-taxonomy.php

Parameters (3)

  • $url
    (string) The original entry URL.
  • $sitemap
    (string) The sitemap type, one of:  post_type|taxonomy|author
  • $object
    (obj) The current entry object, one of: WP_Post|WP_Term|WP_User

Return

  • (string|bool) Entry URL or false

Must return a URL or false. Returning false will exclude the entry from the sitemap.

Usage example

function my_tax_term_entry_exclusion( $url, $sitemap, $object ) {
	// Skip if not in taxonomy sitemap context.
	if (  'taxonomy' !== $sitemap ) {
		return $url;
	}

	// In a taxonomy sitemap context, our $object is a WP_Term object.
    // Exclude term by ID.
    $term_ids = array( 9, 123,  556 ) ;
    if ( in_array( $object->term_id,  $term_ids ) ) {
        return false;
    }

	// Return original URL.
	return $url;
}
add_filter( 'xmlsf_entry_url', 'my_tax_term_entry_exclusion', 10, 3 );

Related

Used byDescription
none
]]>
43165