Page header tag outside of article tag is bad for SEO?

I’ve changed my site structure for design purposes. Here’s how it was:

<article>
    <header class="entry-header">
        <h1>Page Title</h1>
    </header>
    <div class="entry-content">
        <p>Page Content</p>
    </div>
</article>

I’ve moved the page title outside of the article element:

</div>
    <div>
        <header class="entry-header">
            <h1>Page Title</h1>
        </header>
    </div>
</div>
<div>
    <article>
        <div class="entry-content">
            <p>Page Content</p>
        </div>
    </article>
</div>

Can this change affect the SEO? Is there any bad?

To be honest, it is hard to tell how semantic tags help SEO. From all sources I have seen, Google and other search engines have never really come out and described how semantic tags help. But, with that said they can’t hurt in the very fact that you are making the pages more descriptive and structured, so easier for an automated process to get at the information it does want.

I would be inclined to say that it will make little “noticeable” impact on SEO rankings. Having developed parsers and spiders myself, we are more interested in the existence of the <header> tag than its relation to being inside another tag or not. Being inside another tag only helps if we were attempting to look for a tag in relation to the article tag, but since header is its own tag and can be easily picked out of an HTML document then why bother finding <header> by first finding <article>?

Now let me be clear, I am not saying semantic elements are useless. On the contrary, they can be useful and perhaps might be used by search engines. We just don’t know. If Google was to come out and say how it reads the document for its ranking algorithm, there would be copy cats and web masters abusing the system.

When it comes to SEO I always focus on a few things…

  1. Make the content good and useful
  2. Make it accessible to as many people as possible. (people with disabilities, readers, multiple resolutions and devices)
  3. Keep things clean and precise. Don’t attempt to stuff it with keywords, useless tags and tons of useless elements.

The rest I wouldn’t worry too much about. You could optimize for SEO today and tomorrow they can change their algorithm. Believe me, Google changes theirs all the time. I have seen an article go from obscurity to rank 1 back to obscurity in a month time. But as long as it remains useful to users, Google will always pick up on that and rank it accordingly. They do want popular pages easily found. :slight_smile:

Google does try to “understand” a web page so it can serve it in response to relevant searches. I imagine putting a page header inside an article would give its algorithm indigestion trying to understand the page.

I disagree that it would give it indigestion. An <article> is a self-contained item in a document, and may contain a <header> (which, confusingly enough, may also contain a heading (<h1>, <h2>, etc)).

It’s even an example in MDN.

I agree, but an article shouldn’t contain the page heading.

the page heading shouldnt be in an article tag, but that’s not SEO related, that’s just page structure related :stuck_out_tongue:

(And then we have to get into specifying that when we say ‘page heading’, we’re not talking about the <head> tag, which is an entirely different thing.)

In my opinion, the H1 tag must be used once only as a title. We all know the structure of an article that the title must be out of content. The content is followed by the heading h1. This is for a beautiful structure like we can not give the conclusion first and later on the intro. Just like this page headings must be out of content. This is for a good user experience.