How to remove.atom URLs on Shopify?

Shopify, a robust e-commerce platform, empowers thousands of online businesses. However, as with any platform, it may have occasional hiccups. Many users have reported finding hundreds of .atom URLs in their search console with the status "Crawled - currently not indexed," raising concerns about potential damage to SEO. Whilst hiring a Shopify developer to fix the issue is the safest option, we've prepared a DIY guide for those who want to attempt fixing this themselves.

Why is .atom URLs an issue?

.atom URLs are associated with Atom feeds, web feed formats commonly used for content syndication. In the context of Shopify, these URLs appear in the code of the page, they get crawled by bots and may create potential complications in search engine indexing and ranking.

You can see them in the code of the page and they can be picked up by Google bots and even get indexed, whilst not providing any value for users or Google. Frankly speaking, we don’t think these URLs are in use on most websites, but they can be used by some apps.

.atom URLs Solution 1 - block through robots.txt

This is the easiest, but not 100% efficient solution. We’d advise implementing it, only if you don't have many problematic pages. You will need to edit your robots.txt  on Shopify by adding the following code to it:

User-agent: *
Disallow: *.atom

This code tells all search bots not to crawl .atom URLs, however, Google may still prefer to index those!

Your final code should look approximately like this:


# we use Shopify as our ecommerce platform

{%- comment -%}

# Caution! Please read https://help.shopify.com/en/manual/promoting-marketing/seo/editing-robots-txt before proceeding to make changes to this file.

{% endcomment %}

{% for group in robots.default_groups %}

  {{- group.user_agent -}}

  {% for rule in group.rules %}

    {{- rule -}}

  {% endfor %}

{%- if group.user_agent.value == '*' -%}

{{ 'Disallow: /*?q=*' }}

{{ 'Disallow: /*/sandbox/*' }}

{{ 'Disallow: /*.atom' }}

{{ 'Disallow: /*.oembed' }}

{%- endif -%}

  {%- if group.sitemap != blank -%}

    {{ group.sitemap }}

  {%- endif -%}

{% endfor %}


This code also takes care of a few similar SEO issues with Shopify, such as search URLs being crawled.

.atom URLs Solution 2 - removing URLs

This is a more radical solution that removes the URLs completely. This code snippet works by capturing all content for the header, identifying .atom URLs, and removing them from the header. However, it's important to note that while effective, this method is considered somewhat unconventional and may have limitations in the long term.

Editing the content_for_header is frowned upon, as future updates from Shopify could potentially impact its functionality. If Shopify alters how this tag operates, it could affect the website's behaviour in the future, so create backups and do regular checks.

Users seeking to remove .atom URLs from their Shopify stores can consider implementing a liquid code solution. The provided code snippet can be added to the theme files to address this issue.

Find {{ content_for_header }} in theme.liquid and replace it with:

{% capture cfh %}

{{ content_for_header }}

{% endcapture %}

{% assign clnurl = canonical_url | split: "?" | first | remove: shop.secure_url | join | string %}

{% assign atomurl = '<link rel="alternate" type="application/atom+xml" title="Feed" href="' | append: clnurl | append: '.atom" />' %}

{% if cfh contains "application/atom+xml" %} <!-- {{ atomurl | string }} -->

{% endif %}

{{ cfh | remove: atomurl }}


3. Validate your .atom URLs fix with Search Console

Whilst technically this doesn't solve the problem, we recommend doing it after implementing one of the solutions above. After you have implemented your solution, go to Search Console and "Validate your fix" to ensure Google knows about the changes you made.