Skip to content
Home » Blog » Computer Science » The | and ~ Title Separators with Yoast SEO

The | and ~ Title Separators with Yoast SEO

5 minute read

Article updated November 23, 2021: the | and ~ title separators were restored in Yoast SEO 17.5 (released November 2nd) in response to the feedback.

Yoast SEO 17.1 Release Date: September 7th, 2021.

Enhancements: Removes the | and ~ separator options from titles, because Google frequently replaces these in search results.
Yoast SEO’s changelog for version 17.1, highlighting the “enhancement” where they removed the | and ~ separator options from titles.

On September 7th, 2021, the popular WordPress plugin Yoast SEO released version 17.1 that removed the | and ~ separator options from titles. In my professional opinion, this was a poor decision.

Yoast SEO has been consistent in their reason, saying that Google frequently and actively replaces the pipe (|) and tilde (~) characters with a hyphen (-) or em dash () in its search results.

However, Google’s documentation still says that the pipe is a valid separator. And neither of their announcements on September 17th or August 24th mentioned this specific change, but you can see it reflected based on people’s feedback.

Perhaps Google is actively rewriting these title separators. Perhaps Google decided to use their own separators when joining your h1 tag to your site name, but that doesn’t mean site owners and web developers should lose that option entirely, and it certainly doesn’t mean that a company such as Yoast SEO should make that decision for millions of websites.

Google isn’t the only reason why we would choose to use the pipe to separate information. Other search engines like Duck Duck Go and Yahoo will still display the pipe separators in your SERP titles. Social media platforms like Facebook and Twitter will still display them when shared. Even in the Google Chrome browser, they’re still visible at the top of the tab.

This is why I think it was a poor decision by Yoast SEO. This sudden swap makes sense if you’re only optimizing your SERP for Google, making everything else an afterthought. This is not good a digital marketing strategy.

If you look at it another way, why is it a bad thing to allow Google to do their rewrite on your title separators? Why is it our job to make their job easier? They obviously already have the code in place—they’re going to do what they’re going to do. So do what you think looks best that aligns with the best practices for all of the platforms you’re targeting.

The discussion on the most superior title separator goes back decades: hyphen or pipe? I am a personal fan of the pipe character as a title separator for several reasons.

  1. The | and – are not interchangable to me; they separate different types of content. Keith (@SumoFondue), an SEO professional, describes the pipe as a separator of distinct entities and the hyphen for attributes. The example he uses is “Shop ABC Products | Acme Inc” vs “DEF Men’s T-Shirt – Blue”. I very much agree with this assessment because the difference in separators communicates the difference in their relationships between these two things. At least, this is true for English.
  2. The | saves pixel space. Just by looking at | and -, you can see that the hyphen is wider than the pipe. We know that the title’s character count isn’t the only factor in SEO, but the actual width of the characters matter too. This means if you’re using smaller characters, you can fit more of them in your titles. Those who know what kerning is in regards to typography will understand.
  3. The | is just nicer to look at. This is subjective since beauty is in the eye of the beholder, but I prefer a sleek pipe to the hyphen. However, this could be my internalized fatmisia talking and is something I will reflect on.

How to Add the | and ~ Title Separator Options Back into Yoast SEO

If your website has been affected, or it will be because you’re about to update your version of Yoast SEO, follow these steps to ensure your title separators will always be available.

Time needed: 5 minutes

  1. Update Theme’s functions.php file

    copy and paste the code snippet below into your active theme’s functions.php file.
    /** * Add Pipe as Option to Yoast SEO Title Separators * * Adds the Pipe (`|`) character to the list of title separators * in Yoast SEO that was removed in version 17.1. * * @param array $separator_options Yoast SEO's list of title separators * @return array Modified list of title separators */ function tw_wpseo_separator_options( $separator_options = array() ) { $custom_options = array('|','~'); // Define all your custom separators here return array_unique( array_merge( $separator_options, $custom_options ) ); } add_filter( 'wpseo_separator_options', 'tw_wpseo_separator_options', 10, 1 );
    This code is also backward compatible so there isn’t any harm in adding it to your theme if you haven’t updated Yoast SEO to version 17.1 yet, meaning you can add this snippet, update the plugin, and won’t have any issue. Additionally, it will not break your site even after updating to version 17.5 where they’ve been restored.

  2. Choose Title Separator in WordPress Backend

    After that, you’ll then see your custom separator options available to choose from in Yoast SEO’s “Search Appearance” settings.
    Screenshot of Yoast SEO’s Search Appearance settings showing the | and ~ title separator options were successfully added after having been removed in version 17.1.

https://wordpress.org/plugins/wordpress-seo/

Nobody has commented on this yet, be the first!

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.