Yoast SEO Plugin Bug Adds Hidden AI HTML Code

Yoast SEO Plugin Bug Adds Hidden AI HTML Code

754 views

Yoast rolled out an urgent fix after discovering that its plugin was embedding AI-related code into WordPress content. Yoast SEO acted swiftly to address a bug that introduced identifiable markers of AI-generated material. Social media users highlighted the issue, prompting Yoast to resolve it within hours, but not before it caused concern among website owners and SEO professionals.

HTML Classes Introduced Through Copy-Pasting

When text is copied from a live webpage or even a Microsoft Word document and pasted into the WordPress editor, the formatting from the source is often carried over. This behavior explains why directly copying content from ChatGPT and pasting it into WordPress also introduces HTML classes linked to AI-generated output.

An HTML class is an attribute added to an HTML element, such as a paragraph tag <p>, which can then be used to apply specific styles, like font settings or other visual enhancements. However, this bug occurs only when a ChatGPT user highlights generated text, copies it, and pastes it into the WordPress editor. It does not happen if the user utilizes the “copy” icon provided by ChatGPT, as that method strips away unnecessary metadata.

The HTML classes injected into the content are labeled “data-start” and “data-end,” which remain hidden in the code and do not appear in the published content. These classes serve as subtle indicators of AI involvement, though they are invisible to the average website visitor.

Here’s an example of AI-generated content with these injected classes:

“He thought no one would notice—<br data-start=”31″ data-end=”34″ />the quiet hum of the AI<br data-start=”57″ data-end=”60″ />churning out words<br data-start=”78″ data-end=”81″ />like it knew something.<br data-start=”104″ data-end=”107″ />Google noticed.<br data-start=”122″ data-end=”125″ />Now he shelves canned beans at Safeway.”

Below is how the same content appears in its visible form:

“He thought no one would notice—

the quiet hum of the AI

churning out words

like it knew something.

Google noticed.

Now he shelves canned beans at Safeway.”

The “data-start” and “data-end” classes serve as clear indicators that the content originated from AI. SEO professionals now leverage this insight during audits to detect AI-generated material that has been directly copied and pasted into WordPress. These classes, while harmless in some contexts, could raise red flags for those monitoring content authenticity or compliance with search engine guidelines.

Yoast SEO Premium Embeds AI Classes

Alan Bleiweiss, a well-known figure in content audits, pointed out that Yoast SEO was embedding the “data-start” and “data-end” HTML classes into content. Although Alan referred to them as “wrappers,” they are technically HTML classes, and their presence raised concerns about unintended consequences for website owners.

He shared on social media:

“UPDATE

The Yoast Plug-in was released without adequate QA. It injects AI wrappers without the site owner’s consent, potentially causing issues for those unaware of the underlying changes.

Fortunately, according to Carolyn Shelby, they’re actively working on a solution and have already begun addressing the problem.

However, tool providers must improve their processes to prevent similar oversights in the future.”

Alan noted that no explanation was provided regarding how these classes were embedded, but the issue was confined to Yoast SEO Premium , as the free version lacks the AI text generation feature (Yoast AI Optimize). This distinction highlights the importance of understanding the differences between premium and free versions of plugins, especially when new features are introduced without sufficient testing.

Why This Matters for Users

For website owners and SEO professionals, the discovery of these hidden AI HTML classes raises questions about transparency and potential impacts on search rankings. While there is no immediate evidence that these classes affect Google Search Console performance, the presence of such markers could lead to complications down the line.

To avoid any potential SEO issues , users are encouraged to update to the latest version of the Yoast SEO plugin immediately. This incident underscores the need for thorough testing before releasing updates, as insufficient quality assurance can lead to unforeseen problems for users who rely on the plugin for their website’s optimization needs.

Yoast Pushes Update To Fix Bug

Yoast quickly addressed the issue by releasing an update, version 25.3.1, ensuring that AI-generated content created by Yoast SEO Premium no longer contains the problematic classes.

Fortunately, the updated plugin also removes the telltale HTML classes automatically.

According to the official Yoast SEO blog post announcement:

“Recently, we announced the rollout of Yoast AI Optimize for the Classic Editor in WordPress. …During the initial rollout, we discovered a technical issue where unintended classes were being added to content for some users. While these added classes are harmless and do not impact the functionality or appearance of your content, they should not have been added, that’s on us.

We take this seriously, and to maintain the quality you expect, we’ve been actively working on a solution. We’re pleased to share that a fix has now been released, and the issue has been resolved. For users already affected, we are automatically cleaning up the unintended classes as part of the fix, no action is needed on your part.”

The functionality was rolled out on June 2nd, meaning that sites with affected content may have been live for up to two weeks.

The free version of the plugin has also been updated. The changelog provides this explanation:

“This is a maintenance release which is required to align with changes to Yoast SEO Premium 25.3.1.”

Can This Have Impacted Rankings?

It’s likely that this issue has not affected search rankings, but at this point, it’s unclear whether Google detected the classes. For Google to take notice, it would need to specifically look for these classes, which in themselves do not indicate anything about content quality. Therefore, it’s probably unlikely that this bug impacted search rankings.

Nevertheless, users of the premium version of the Yoast SEO Plugin should update immediately to version 25.3.1 to address any potential issues stemming from this bug . Users of the free version should also update their plugins, even though it was not directly affected.

Could Buggy Release Have Been Prevented?

The AI class injection issue was only recently discovered, although it may have existed since the feature’s introduction in August 2024. Changes to content, site structure, and underlying HTML should always be thoroughly tested by plugin developers before releasing updates to users.

This is particularly critical for the developers of the Yoast SEO plugin, as they have a history of pushing out problematic updates. For instance:

In March 2022, Yoast SEO published an update that created duplicate sitemaps.

In March 2018, a buggy update led to the creation of hundreds or even thousands of thin pages, with one page generated for each image uploaded to a website. That issue went undetected for three months as SEOs gradually noticed the influx of new pages.

Partner with our Digital Marketing Agency

Ask Engage Coders to create a comprehensive and inclusive digital marketing plan that takes your business to new heights.

Contact Us

This marks at least the third time that Yoast has released a buggy update that could have been avoided with proper testing. All it takes is comparing a test site before and after an update to ensure consistency. Given the stakes surrounding AI-generated content, both the output and the underlying code should have been rigorously tested before the feature went live.

Share this post