I am using HEAD to populate the tags in the HTML document. Every tag though is being populated with a class added to it 'next-head'. Google SEO isn't liking it. How can i remove it?

it's added by next internally and I don't think there is any SEO impact with the class.
Right i understand it's being added internally, even if i were to have a custom renderer i get those class names. Google seems to be fetching the tags along with the class names and mixing them both up.
This is what google is fetching(Notice that it is appending the class name to the title):
Enjoy pizza delivered to you in NYC. Order Now!! class=next-head
Is there a way to disable those classes?
They are added to every element inside Head and I'm afraid there is no way of disabling this behaviour.
https://github.com/zeit/next.js/blob/29c4035eb5ef093e415e3723e0f3e9b883864953/lib/head.js#L29-L32
I don't think Google should include class name in title. It doesn't happen on ZEIT website or on LearnNextJS.com.
Can you show code you are using to populate head?
Talked to rauchg about this and we could try using refs to no longer need next-head.
I installed ramen.is which has a snippet that you need to install before you can continue to the dashboard. It checks for the snippet exactly, and the next-head class throws it off. It would be nice if this was found to not be needed and could be removed.

Can I remove the class attribute here? Our SEO team doesn't like it and wants it removed.
This is needed for us to rehydrate the head correctly on the client when navigating with next/link. Using refs wouldn't work as it is server rendered too.
The problem is that we can't clear the whole <head> as it will also contain anything provided from _document.
I guess I have to tell the SEO team "no" then? I legit have no idea whether this affects SEO.
We are also seeing strange SEO results (broken strings in google results) after re-launching with NextJS, and these weird tags in head seem suspicious.
Generally, it like a pretty awkward tactic to add class attributes to meta tags and title tags. It’s not specified that that’s OK to do (https://www.w3.org/TR/html52/document-metadata.html#the-title-element and https://www.w3.org/TR/html52/document-metadata.html#the-meta-element)
The end result is a big buzzkill because this is the kind of thing it’s hard to find out until you actually launch and watch your critical numbers drop in production, as Google reacts over time.
So — another vote from us — please consider trying to find another way to deal with this—
launch and watch your critical numbers drop in production, as Google reacts over time
Same here
Please fix this or notice in the README
also I noticed a wrong Google index result because of nextjs changing title with a delay after the transition.
Do anybody know how to fix this? Temporary workaround is to change window.location.href instead of router push
This is really a problem. It is very possible to remove the class.
Is there any way to remove class="next-head" from head tags? Thanks for the answer in advance.
This is needed for us to rehydrate the head correctly on the client when navigating with next/link. Using refs wouldn't work as it is server rendered too.
The problem is that we can't clear the whole
<head>as it will also contain anything provided from _document.
@timneutkens just for clarification, if the class name is removed/modified from a link tag does it effect how next.js rehydrates?
A consultant did an SEO audit of our pages and noted that how our link tag renders can actually effect how Google reads the page.
This is how our link tag currently reads.
<link href="https://randomsite.org" rel="canonical" class="jsx-2891656962 next-head"/>
This is how the consultant recommended how our link tag should be written.
<link class="jsx-2891656962 next-head" rel=”canonical” href=”https://randomsite.org/” />
Now, I can manipulate the class name position in the link tag by adding a custom class as shown below, however, by doing so the auto-populated 'next-head' class does not show. Would this cause an issue in the rehydration process?
<link class="random-class" rel=”canonical” href=”https://randomsite.org/” />
i got issues with the class="next-head" to add metatags that needs verification from external sites, how can i remove that class
FYI we've now removed this class from the <title> element.
This has been fixed!
Fixed in #8020
Most helpful comment
This is really a problem. It is very possible to remove the class.