2

I have always created my web pages to ensure they can be validated by W3C. Namely, when I am using HTML entities in my title tag or meta description, I will ensure that these characters are being escaped.

For example:

<title>Hello &amp; World</title> [Escaped]

vs

<title>Hello & World</title> [Unescaped]

Strangely, when I use site:example.com to inspect my web pages in the Google SERPS, the escaped titles do not appear properly formatted, leaving me with concerns regarding effects on CTR.

The title appearing in the Google SERPS would be.

Hello &amp; World

I have also noticed the same issue with my meta description. If I escape HTML entities in the meta description, they do not appear unescaped when being displayed in Googles' SERPS.

Conversely, when I unescape HTML entities in the title tag and meta description, they are being displayed properly, however my webpage are not in accordance with a W3C validator.

Will this eventually auto correct in the Google SERPS with time? What exactly is going on here? As a result of this idiosyncrasy, many of my Google SERPS look ugly, which will have an unfavorable effect on CTR.

I want to abide by W3C standards ideally, however I am unable to get my results to display properly in the SERPS by doing so. I should add that this issue is happening as well on Bing and Yahoo. Additionally, when I inspect source code of other web pages, they are using escaped entities in their title tag and meta description, with both displaying properly with the unescaped representation in SERPS.

Perhaps I am misunderstanding something basic, however my research online has indicated that all HTML entities should be escaped before being added to a webpage. Interestingly, checking a Twitter validator and Open Graph Validator shows the proper formatting of the titles and meta descriptions. I should also note, I defined a meta tag with charset=utf-8 in my page. Perhaps this is contributing to the behavior.

1
1

Google works correctly. If I search for "ampersand in title" I can find several results such as this one that show an unescaped ampersand in the Google search results while I having an escaped ampersand in their HTML source code.

i.stack.imgur.com/Dt9YY.png

<title>A Guide to the Ampersand (&amp;) | Proofed’s Writing Tips</title>

Your site has an HTML entity appear in the search results

because your page at one point had a double escaping. The version of the page in the Google cache for your page has a <title> tag with a double escaped ampersand.

It appears that you have fixed the double escaping on your live site.

At this point you need to have Googlebot re-crawl and re-index your page. If you want to speed that process up, log into Google Search Console, inspect that URL, and run a live test. That will force Googlebot to download the page imediately and should it to re-index it within a couple days.

3
  • Thanks, I will inspect the URL in Google Search Console and report back to see if it is fixed after the page is re-crawled. I will add though, that I am almost certain the page never had any double escaping, as there is not logic in the backend of my code base that would be double escaping characters (nor logic in my template rendering). Nonetheless, my pages that unescape the characters (not conforming to WC3 standards are being displayed properly). I do appreciate your time and insight. I will move onto working on others things and report back with my findings :) Feb 18 at 13:19
  • Interesting.. I just submitted the URL in google and looked at the page source provided by the Google Crawler. It seems there is double escaping going on. Here is what the search console gave me: <title>Dolce &amp;amp; Gabbana Light Blue edt 4.2 oz Cologne for men NEW tester with cap | BuyzDirect.com</title> Feb 18 at 13:24
  • Doing some research on SO, seems the web framework I'm using must be escaping automatically on the template level. If someone else finds this having the same issue, this is likely the cause :) Feb 18 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.