← Insights

Shopify title tag length: what the theme appends, what Google cuts, and the characters that are yours

The theme appends the store name to every title, so one written to sixty is cut. The budget, the suffix arithmetic, the admin fields and a five-minute check.

13 min read

Contents — 7 sections

Google cuts a title at the width of the device, and a character count is the proxy

Google's title link documentation settles the length question in one sentence: there is no limit on how long a <title> element can be, but the title link is truncated in results as needed, typically to fit the device width. No character count appears anywhere on the page. What does appear is the list of sources Google draws a title link from — the <title> element, the main visible title, heading elements, og:title, other large and prominent text, anchor text, WebSite structured data — and a list of the problems that make it write its own.

So the answer to "how long" is a width, and the count is a stand-in for it. We hold every page on this site to 30 to 60 characters for the full <title>, store name included, and the check that runs against every build refuses a page outside that band. The ceiling is roughly where an ordinary mix of lowercase letters starts to be cut on a desktop result; a phone shows less. The floor is there because Google's own examples of a bad title are "Home", "Profile", and | Site Name with nothing in front of it — a short title is an invitation to have one written for you from the H1.

Width rather than count has two consequences the admin's character counter cannot show. A title in capitals is wider than the same title in lowercase and is cut sooner. And a title that fits on the laptop it was written on is cut on the phone most of the traffic uses.

One more part of the mechanism matters for a Shopify store specifically. Google shows a site name above every result, separate from the title link, chosen from the home page's WebSite structured data, og:site_name, <title> and headings. Because the name is already on the result, the same name at the end of the title link is redundant, and Google says it may omit it. The store name the theme appends to every title is therefore the part most likely to be removed, and the part that carries the cut when it is not.

The theme appends the store name, and it spends the budget before you do

Every title on a Shopify store is written by four lines of Liquid. Shopify's metadata guide shows them, Dawn has them in layout/theme.liquid, and Horizon has the same four in snippets/meta-tags.liquid:

<title>
  {{ page_title }}
  {%- if current_tags %} &ndash; tagged "{{ current_tags | join: ', ' }}"{% endif -%}
  {%- if current_page != 1 %} &ndash; Page {{ current_page }}{% endif -%}
  {%- unless page_title contains shop.name %} &ndash; {{ shop.name }}{% endunless -%}
</title>

The first line is page_title, the global Liquid object that carries whatever the admin holds for the current page. The last line decides most title lengths on most stores: unless the page title already contains the store name, the theme appends an en dash and shop.name. The suffix costs the length of the name plus three — a space, the dash, a space. Nothing in the admin shows it: the Search engine listing preview renders the field you typed, and the suffix is added when the page is served.

Store nameSuffix costLeft of the 60 for the page title
6 characters951
12 characters1545
18 characters2139
24 characters2733

This is the arithmetic behind nearly every cut title we measure on a Shopify store. The merchant wrote to sixty, because sixty is the number every guide gives, and the theme added fifteen. The fix is not to remove the suffix: Google's advice is to brand titles concisely — the site name once, at the start or end, behind a hyphen, colon or pipe — and the four lines do exactly that. The fix is to subtract the suffix first and write to what is left.

The contains clause is the one lever. It is a plain substring test, case-sensitive, against the name exactly as Settings holds it, trailing spaces included. Type the store name into a page title yourself, in the same form, and the theme appends nothing. Type it in a different case, or abbreviate it, and you get both: yours in the title and the theme's after it, which is how a title reaches seventy on a store where nobody wrote seventy characters.

The middle two lines add strings to collection and blog pages. A tag-filtered collection gets – tagged "wool, navy" from current_tags; the second page of any paginated list gets – Page 2 from current_page. Both are correct, because they distinguish pages Google would otherwise treat as one, and both sit in front of the store name, so on a long collection title the name is cut first and the page number second.

The same file writes og:site_name as shop.name and og:title as page_title on its own, without the suffix. Google lists og:title among the sources for a title link, so the suffix-free title is always a candidate for what Google shows.

Four admin fields write the title, and each page type reads a different one

The store name. Settings, Store details, Store name. It reaches the title through shop.name, and it reaches order emails, the checkout header and every notification through the same object, so shortening it is a decision about the brand rather than about search results.

The home page. Online Store, Preferences, the section titled Title and meta description. The Homepage title entered there is page_title on the front page. Google's documentation calls the home page the reasonable place for a few extra words about the site, and because that title almost always contains the store name, the contains clause fires and the whole sixty is yours on this one page.

Products and collections. Each edit screen ends with a section called Search engine listing, with a preview and an Edit link, and behind it a Page title field. When it is empty, page_title is the product or collection title itself, which is where most titles on most stores come from. The Admin API exposes the field as the SEO object on a product or collection — two strings, title and description — and accepts it through SEOInput on the create and update mutations, which is the route for rewriting several hundred at once. The field's character counter counts to Shopify's storage limit, which is higher than the budget and knows nothing about the suffix; a page title that fills the counter will be cut.

Pages and blog posts. The same Search engine listing section, the same fallback to the page or article title, the same counter. None of the four shows the rendered result; the full <title> exists only in the served page, which is why the check below reads the page and not the admin.

Google rewrites more titles than it cuts, and a store hands it the reasons

A cut is visible and mild: the ellipsis lands in the store name or the last word before it, the reader still sees the product, and the loss is the brand, which the site name above the result already supplied. Rewriting is the larger effect, and each problem in Google's list has a Shopify shape.

Boilerplate is the commonest. A page title written as "Buy Merino Wool Socks Online | Free Shipping" repeats four words no buyer typed on every product in the store; Google's example is a band site with "See videos, lyrics, posters, albums, reviews and concerts" on every page, and its remedy is to drop the words that do not vary. Micro-boilerplate is the catalogue cousin: six colourways of one shirt sold as six products with six identical titles, because the colour lives in the option and not in the title; Google's example of what it does next is to take the distinguishing word from the page's prominent text and insert it itself.

No clear main title is a theme question. In Dawn the product title is the page's h1, written in sections/main-product.liquid. In Horizon it is a text block whose content in templates/product.json is <h1>{{ closest.product.title }}</h1> — an h1 by default, editable in the theme editor, which is where it stops being one. In both, the failure we see is a banner or app section rendered as a heading at the same weight above the title, which Google's documentation says may become the title link instead.

And duplication of the site name is the Shopify default. With the suffix on every page and the site name shown above every result, Google may drop the name from the title link. Plan for that: the title has to read correctly with the suffix removed, which is another reason the product and its attribute go first.

Google does not report which of these it applied. The audit script we run on a prospect's product page reads the served <title> and records a finding only at 90 characters or more, or 19 or fewer — three characters over the budget is not worth a stranger's attention, ninety is. Between those bounds the question is not the length but whether Google kept it, and only the search answers that.

Write the product, then the one attribute that tells it apart, then stop

A product title is three things in a fixed order: the product, the attribute that distinguishes it from the products next to it in the results, and the store name once, which the theme supplies. Not "Buy", not "Shop", not "Online", not "Free shipping": none of which the reader typed, all of which are the boilerplate Google's documentation says it rewrites. The attribute is the part most product titles lack. Material, colour, size range, version: it lets two products from the same store be told apart on one result page, and Google inserts it itself when it is missing, in a place you did not choose.

A collection title is the category noun and one qualifier. "Women's linen shirts" is a collection title; "Women's collection" is the vague descriptor Google's documentation warns against, and "Shop all women's linen shirts online" is boilerplate with a collection inside it.

The home page is the exception where the store name leads and a phrase about what the store sells follows. Google also reads that title when it chooses the site name, so the name goes in as you want it shown, not as a slogan.

A long store name has three honest options. Shorten it in Settings, accepting that it changes everywhere the brand appears. Write the name into each page title yourself in a shorter form, so the contains clause suppresses the suffix — which only works if the shorter form is a substring of the full name as Settings holds it: "Atelier" inside "Atelier Genève" suppresses it, "AG" does not. Or leave it, subtract it, and write shorter titles. Removing the last line from the theme is the fourth option and usually the wrong one: it removes the name from every page including the ones where it was doing work, and Google already removes it where it is redundant.

The description under the title is a different budget with a different mechanism, and Shopify meta description length covers it, including why the description loses to the page's own first sentence more often than it is cut.

Check every title in five minutes, and the one you care about in one

For one page, open it, open the browser console, and paste:

const t = document.title;
const site = document.querySelector('meta[property="og:site_name"]')?.content ?? '';
const suffix = site && t.endsWith(' – ' + site) ? ' – ' + site : '';
console.log(t.length, JSON.stringify(t));
console.log('suffix', suffix.length, '| yours', t.length - suffix.length,
            '| name appears', site ? t.split(site).length - 1 : 0, 'time(s)');
const c = document.createElement('canvas').getContext('2d');
c.font = '20px Arial';
console.log('width', Math.round(c.measureText(t).width),
            '| in capitals', Math.round(c.measureText(t.toUpperCase()).width));

document.title collapses the whitespace the theme leaves inside the element, so the first number is what a search engine reads. The second line is the suffix arithmetic: what the store name costs, what is left, and how many times the name appears — two means the page title carried a different form of the name and the theme appended it again. The third line is the width argument made visible: the same title measured as written and in capitals, in an arbitrary font. The numbers are not Google's; the ratio is the point.

For the whole store, Shopify publishes every product and collection URL in /sitemap.xml, which links to the child sitemaps. This reads them and prints, per page, the title length, the length without the suffix, and whether the suffix is there, with a half-second pause between requests:

import html, re, sys, time, urllib.request
from xml.etree import ElementTree as ET

STORE = sys.argv[1].rstrip('/')
HEADERS = {'User-Agent': 'title-length-check/1.0'}

def get(url):
    req = urllib.request.Request(url, headers=HEADERS)
    with urllib.request.urlopen(req, timeout=20) as r:
        return r.read().decode('utf-8', 'replace')

def locs(xml):
    root = ET.fromstring(xml)
    out = []
    for entry in list(root.iterfind('.//{*}sitemap')) + list(root.iterfind('.//{*}url')):
        loc = entry.find('{*}loc')
        if loc is not None and loc.text:
            out.append(loc.text.strip())
    return out

pages = []
for child in locs(get(STORE + '/sitemap.xml')):
    if 'sitemap_products' in child or 'sitemap_collections' in child:
        pages += locs(get(child))

print('title_chars,own_chars,suffix,url')
for url in pages:
    src = get(url)
    t = re.search(r'<title>(.*?)</title>', src, re.S)
    title = ' '.join(html.unescape(t.group(1)).split()) if t else ''
    s = re.search(r'<meta\s[^>]*property="og:site_name"[^>]*content="([^"]*)"', src)
    site = html.unescape(s.group(1)) if s else ''
    tail = ' – ' + site
    has = bool(site) and title.endswith(tail)
    own = len(title) - len(tail) if has else len(title)
    print(len(title), own, 'yes' if has else 'no', url, sep=',')
    time.sleep(0.5)

Run it with the store's address as its one argument and open the output in a spreadsheet. Sort by the first column: everything over 60 is the rewrite list, and the second column says how much of each is yours to shorten. Sort by the third: no on a store whose theme appends the name means the page title already contained it, and those rows are worth reading one by one, because some are deliberate and some are the name in a different form with the suffix after it. The home page is the first row, and no is correct there.

Which of the rewrite list to do first is a Search Console question. Performance, Search results, filter Page to contain /products/ or /collections/, sort by impressions, and read click-through rate against average position. A page at position four with half the click-through rate of its neighbours has a title losing to them. Then search that page's query on a phone and read the title as Google renders it, because the render is the only place the cut, the rewrite and the dropped site name are visible.

Fix the home page and the twenty pages with impressions first, and it takes an afternoon

First, the store name, only if it is long and only if the brand can carry the shorter form everywhere. Five minutes to decide; the rest of the plan depends on the number.

Second, the home page title in Preferences: the name, a colon or a dash, and what the store sells, within sixty, with the name in the exact form Settings holds. Five minutes.

Third, the twenty pages with the most impressions in Search Console, products and collections together. Subtract the suffix, write the product and its distinguishing attribute into what is left, delete every word a buyer would not type. Twenty titles is an hour, and it is the hour that moves click-through rate, because those are the pages being shown.

Fourth, the rows over 60 from the script, in impression order, as far down as the afternoon allows. On the long tail the defaults usually did the work: a product title of four words plus the suffix is inside the budget without anyone having edited it.

Then wait. Google has to recrawl and reprocess a page to notice a changed title, and its documentation puts that at a few days to a few weeks; URL inspection in Search Console will request a recrawl for the twenty. Read click-through rate on those pages again after a month, at the same positions, and search two of the queries on a phone to see whether Google kept what you wrote.

The title is the first line of a result and the cheapest thing on a store to measure, which is why it belongs beside the first-hundred-words check in section five of the store audit checklist. If you would rather have every title read, ranked against everything else we find, and written up, that is the Store Teardown: €750, five days, and the document is yours whatever you decide.

Own your growth.Start with the teardown.

Start with a Teardown. Read it, then decide whether you want us to fix what it finds.