
Free validator: run your XML feed straight from the browser. It highlights the exact line, any duplicate IDs, absent fields and price formatting issues. The file never leaves your machine.
Entire feed or just some items: identify which situation applies
Start by figuring out the failure type. A syntax error indicates the whole feed is corrupt – Merchant Centre won’t read it and your product tally drops or stops refreshing. A data error works differently. The XML parses, but certain items lack mandatory attributes or carry a wrongly formatted price, causing Google to reject them one by one and list the cause in the diagnostics.
The initial quartet deals with syntax, the final pair with data. The checker evaluates every point, yet understanding each origin helps, since a correction only holds where the feed is generated.
1. A raw ampersand
This one causes more rejections than anything else. In XML the ampersand begins an entity, so in text it has to appear as &. It is not only product names such as "Surf & Sun Towel". It also appears in links with several query parameters:
<!-- broken -->
<link>https://shop.example.com.au/p/2001?colour=blue&size=160</link>
<title>Surf & Sun Beach Towel 160 cm</title>
<!-- valid -->
<link>https://shop.example.com.au/p/2001?colour=blue&size=160</link>
<title>Surf & Sun Beach Towel 160 cm</title>
You can also wrap a value in CDATA (<![CDATA[ ... ]]>), where special characters are left alone. The method matters less than where you apply it: in the code that writes the feed, to every value from the database. Renaming one product to "Surf and Sun" only hides the issue until the next ampersand turns up, and one product is enough to break the file.
2. Control characters
XML 1.0 permits tab, line feed, carriage return and characters from U+0020 up, with a few technical gaps. Any other control character, U+0007 or U+0000 for example, is not allowed anywhere, inside CDATA or as a numeric reference such as . They arrive in descriptions through text copied from Word or a PDF, spreadsheet imports, an old database in a different encoding, or a multi-byte character cut in half.
Remove those characters during feed generation using a single routine that scans each text field. They’re invisible to the eye because they render no glyph. The checker reports the exact line, column and character code.
3. Leading whitespace, BOMs and character set
The line <?xml version="1.0" encoding="UTF-8"?> has to open the file. A blank line or a space ahead of it is an error, and a template is the usual culprit, for instance a newline left before an opening PHP tag or inside an included file. A byte order mark at the start of a UTF-8 file is legal, but when a feed is assembled from several pieces a BOM can land in the middle, and the parser then gives up.
Your stated encoding must mirror the actual one. End‑to‑end UTF‑8 – from database through generator to file and response header – is the most reliable. If they differ you’ll see garbled accented characters or an error at the first non‑ASCII symbol.
4. Truncated file and duplicate IDs
If generation stops partway (timeout, out of memory, a restart), you end up with a file missing its closing </channel> and </rss>. The parser reports an unexpected end, and the file is noticeably smaller than normal. Guard against it by writing to a temporary file, validating it, and only then replacing the file that Google fetches.
Repeated id values leave the syntax alone but harm the data. Each id needs to be unique in the feed and stay the same over time. When one repeats, Merchant Centre treats the rows as one product, so one may be dropped or overwrite the other. It typically happens with variants (size, colour) exported without their own id, or when two sources share a numbering scheme. Tie variants together with item_group_id and give each its own id.
5. Mandatory attributes for each product
The product data spec from Merchant Centre mandates the following fields on each item. Omit any, and that product will be rejected:
| Attribute | What goes in it | Common slip |
|---|---|---|
id | A distinct, permanent ID, no longer than 50 characters | Reused for variant lines, or re‑assigned when the store is refreshed |
title | Product title, limited to 150 characters | Leave empty, or pull from a different language version |
description | Simple text description, max 5,000 characters | No entry for items brought in from a supplier |
link | Complete https URL of the product page | Can be a relative path, a redirect, or an ampersand that isn’t escaped |
image_link | The product image URL | Leave empty if there’s no image, or if the file was removed |
price | Amount and currency code | See the next item |
availability | in_stock, out_of_stock, preorder or backorder | Any free‑form text, e.g., "available" |
Additional fields vary by product type – brand, GTIN, clothing size, etc. The validator ignores them; Google’s Merchant Centre Help outlines the required specs.
6. Price format
Google wants a number with a period as the decimal mark, a space and a three-letter currency code: 34.95 AUD. Exports from shop platforms often come out with a dollar sign ($34.95), a decimal comma (34,95 AUD), a thousands separator (1,299.00 AUD) or no currency. Any of these gets the product rejected. For Australia, the advertised price should include GST, matching what the customer pays on the product page; a price that differs from the page triggers a mismatch even when the format is correct.
Once you’ve identified the issue
- Address the root cause, not the file. Tweaking a generated file is lost on the next export. Update the feed‑writing code: escape special characters, remove control characters, output to a temp file first.
- Cross-check with a second tool. On a server,
xmllint --noout feed.xmldoes it: silence means the syntax is valid. - Ask for a fresh fetch in Merchant Centre and check the data source's processing status. That tells you if Google took the file.
- Check product totals pre‑ and post‑incident. If numbers haven’t bounced back, review the diagnostics to see why specific items failed.
- Set up an automated post‑generation check: parse the XML, compare product totals with the prior file, and trigger an alert on a steep drop. This prevents the next glitch from first appearing as reduced sales.
Fixing the feed won’t make products appear instantly – Merchant Centre controls the re‑review schedule. If you’ve made major changes to the store, run a test feed before letting Google re‑process it.
Privacy – how the checker handles your file
The feed checker operates locally in your browser. Its script lives on the page and never sends the file to a server. Open your browser’s dev tools – after clicking “Check feed” the Network panel stays blank. You can also drop only the first few lines of a product file and it will still run.
Selling to several countries means every market requires a separate feed, its own IDs and validations. Details on configuring this are on the multi‑country Google Ads page.
Common questions
Why does the whole feed get rejected instead of just some items?
If the file isn’t valid XML – for example it contains an unescaped ampersand or ends abruptly – it can’t be parsed. Missing fields or incorrect prices only remove the specific items, but a syntax fault blocks the entire file.
Is it OK to drop my shop’s feed into the checker?
Sure. The checker runs solely in your browser and never sends the file elsewhere. You can also paste just the opening segment with a few products; the parser will still spot any syntax issues.
Where do ampersands need to be escaped?
Escape ampersands in the feed‑generating code – use an XML‑escape routine or wrap values in CDATA. Manual tweaks to the final file won’t stick, as the next export will replace it.
When can I expect my products to reappear after fixing it?
Trigger another fetch in Merchant Centre and monitor the data‑source status. Google controls the re‑review duration, so don’t give anyone a guaranteed timeframe.
Attribute guide: Google Merchant Centre product data specification. Got a query? Email us at hello@aussitelab.pro.