sseller.tips
有中文版:切换到中文 →

Google Merchant Center XML feed: a working example and the mistakes that break it

An XML product feed for Merchant Center is a normal RSS 2.0 file with one addition: Google’s own namespace, which lets you add product attributes like price and availability. Get that one detail wrong and Google silently ignores your data.

A complete example

This follows the structure of Google’s RSS 2.0 example, with one product:

<?xml version="1.0"?>
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
  <channel>
    <title>Example Store</title>
    <link>https://www.example.com</link>
    <description>Product feed for Example Store</description>
    <item>
      <g:id>MUG-001</g:id>
      <g:title>Handmade Ceramic Mug, 12 oz, Speckled White</g:title>
      <g:description>Wheel-thrown stoneware mug, dishwasher safe.</g:description>
      <g:link>https://www.example.com/products/ceramic-mug</g:link>
      <g:image_link>https://www.example.com/images/mug-001.jpg</g:image_link>
      <g:condition>new</g:condition>
      <g:availability>in stock</g:availability>
      <g:price>28.00 USD</g:price>
      <g:shipping>
        <g:country>US</g:country>
        <g:service>Standard</g:service>
        <g:price>6.00 USD</g:price>
      </g:shipping>
      <g:gtin>123456789123</g:gtin>
      <g:brand>Example Store</g:brand>
    </item>
  </channel>
</rss>

Add one <item> per product. Replace the GTIN with your product’s real one, or leave it out if the product doesn’t have one.

The namespace: the line that matters most

<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">

This declaration is required to use Merchant Center attributes, and it must match exactly. After declaring it, every attribute needs the g: prefix:

  • <g:price>28.00 USD</g:price> — understood.
  • <price>28.00 USD</price> — not understood. Google says an attribute without the namespace causes a warning and isn’t processed.

This is the cause of the “XML missing attribute” issue. If your feed shows it, check both the prefixes and the header line.

For an Atom feed, the header is:

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:g="http://base.google.com/ns/1.0">

What Google requires and ignores

  • RSS 2.0 makes title, link and description optional at item level, but product feeds require them.
  • Product feeds also require attributes such as price, ID and condition.
  • Google ignores any other RSS elements and custom tags — they won’t cause an error, but their data won’t appear in your ads or listings.

The full list of attributes, and which are required for your products, is in Google’s product data specification.

Checklist before uploading

  1. The file name ends in .xml.
  2. The file name matches the name registered in Merchant Center.
  3. The namespace declaration is present and exact.
  4. Every product attribute has the g: prefix.

After the upload, check each product’s status for issues — see Google Merchant Center product status.

Official references

Google Merchant Center is a trademark of its owner. seller.tips is independent and not affiliated with Google Merchant Center.