Documentation
Sitemaps, the news sitemap and the Google indexing script
Accurate sitemaps, good internal links and good content are what get pages found and indexed. This page covers the sitemaps OnlyAI SEO builds and the optional script for telling Google about new addresses quickly.
The sitemaps
Your main sitemap index is owned by your primary SEO plugin — Rank Math, Yoast, All in One SEO, SEOPress — or by WordPress itself (/wp-sitemap.xml). OnlyAI SEO does not build a second one: it passes its own sitemaps into that index and into robots.txt instead. On very large sites it also restores the post types WordPress itself left out of its index. Anything marked noindex, password protected or not published is left out of everything it serves.
On sites where no other SEO plugin carries images in sitemaps, OnlyAI SEO serves an image sitemap (/image-sitemap.xml): featured images, images inside your posts and product galleries from posts, pages, products and any custom post type, each with its alt text. It stands down by itself when Rank Math, Yoast, AIOSEO or SEOPress is active.
The Google News sitemap
/news-sitemap.xml lists posts published in the last 48 hours, newest first, up to 1,000, the way Google News expects: the address, your site name as the publication, the language (a two-letter code taken from your site language), the publication date in UTC and the title. Each entry also carries the article’s featured image with its alt text, the way Google News shows thumbnails. It follows these rules, which are checked by an automated test:
- Posts older than 48 hours, drafts, scheduled posts, password-protected posts, pages and anything set to noindex are not listed.
- A post you publish appears in it straight away, and one you trash disappears straight away. The file is also refreshed at least every 15 minutes as the 48-hour window moves.
- Titles have their HTML removed and are escaped, so a title with an ampersand or quotes cannot break the XML.
- It is listed in the sitemap index. Submit
/news-sitemap.xmlin Google Search Console as well, and make sure your publication is approved in Google Publisher Center: the sitemap alone does not put a site into Google News. - To include a custom post type, use the
onlyai_seo_sitemap_news_post_typesfilter. To switch the news sitemap off, use the switch in the sitemap settings.
Fast Google indexing (built in, optional)
OnlyAI SEO can tell Google about your posts through the Google Indexing API, from your own site, with nothing to install or run on a computer. Open OnlyAI SEO, Indexation, find Fast Google indexing, paste a Google service-account key once and switch it on. After that, a minute after a post is published or updated the plugin sends its address, it sends a removal notice when a post is deleted or unpublished, and it keeps a short log of what happened.
- Set-up (about 5 minutes, once). In Google Cloud, create a project, enable the Web Search Indexing API, create a service account and download a JSON key. Paste the key into the plugin, then add the service account's email (the plugin shows it) as an owner of your site in Search Console (Settings, Users and permissions) and press Test the connection. A 403 almost always means that last step is missing. The key is stored encrypted on your site, never shown again and sent only to Google.
- Quota. Google's default is 200 addresses a day for your project. The plugin counts them (the quota resets at midnight Pacific time), sends the newest first, stops at the day's limit and stops at once on a 403 or 429. You can set a lower daily limit. Older posts are sent only if you tick Also send older posts, a few at a time.
- What counts as new. A post is sent when it is published and again when it is changed, but not twice within six hours. Posts marked noindex, password-protected posts and drafts are never sent.
- Be aware. Google documents the Indexing API for job posting and livestream pages only. It often accepts other addresses, but that use is outside Google's documented policy, Google can withdraw access, and a successful call does not guarantee faster crawling or indexing. For a news site the news sitemap, Search Console and fast, well-linked pages matter far more.
Want step-by-step screenshots instead of reference? Read the guides, or see how OnlyAI SEO compares with other SEO plugins.