5

Most of the pages on my site seem to have indexed just fine. However, when I do an inspection for a certain page on my site, let's say it's http://www.example.com/importantpage.html, it shows "URL is not on Google". The reason is listed as "Duplicate, Google chose different canonical than user". However, below that it shows

User-declared Canonical: http://www.example.com/importantpage.html

Google Selected Canonical: N/A

How did "Google choose a different canonical" but the Google Selected canonical is N/A?


In the head of importantpage.html I have the following tag defined:

<link rel="canonical" href="http://www.example.com/importantpage.html" />

I also have this entry in the sitemap:

<url>
    <loc>http://www.example.com/importantpage.html</loc>
    <lastmod>2018-10-01</lastmod>
    <priority>1</priority>
</url>

I also have a tag defined:

    gtag('config', '<property id>', {
        'page_title' : 'importantpage.html',
        'page_path': '/importantpage.html'
    });

The only thing I can think of that is different for this page is that we have a domain that forwards directly to it (eg, www.1.example -> www.example.com/importantpage.html). But since I'm defining the canonical I don't see how this would cause it, but it does seem like a likely culprit. If so, how would I fix it?

Things to note:

  • We have no HTTPS
  • I am rewriting everything to www. in .htaccess.
  • We have multiple domains that redirect (301) to www.example.com
  • We have one domain that forwards to www.example.com/importantpage.html (as mentioned above)

.htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
3
  • 1
    Not that it will solve your problem, but you should remove the priority and lastmod fields from your sitemap. They only take up space and make you sitemap larger. Google doesn't use them. Google Says They Mostly Ignore the lastmod Tag In XML Sitemaps Oct 9, 2018 at 1:16
  • 2
    @StephenOstermiller For what it's worth Google officially states that the lastmod field is important, however the Google employee's answer that you linked states that it is mostly ignored. I wonder if this is a case of "this is our official stance, but it's not what we actually do". Oct 9, 2018 at 3:20
  • 1
    @MaximillianLaumeister while they do include it, Googlebot does what Googlebot does when it wants to. lastmods, and crawling recommendations may be taking into account but while Google may recommend including it, it doesn't seem to change their schedules. Include it if you want (and if it's going to be updated) but I think it will make little difference to your crawl rate which tends to be determined by a range of other criteria.
    – garth
    Oct 9, 2018 at 4:04

1 Answer 1

1

If your domain redirects are permanent then Google should only be indexing the final page.

If you are marking the page as canonical then it should be accepting that as the page to index.

But as Google believes that you have duplicate page...

"Duplicate, Google chose different canonical than user"

(and it's probably a duplicate instance of that page) then that is what you should focus on removing.

I'd use a SEO site link check tool to list all links being created by your site, and find the possible duplicate(s).

Without seeing the site, and the htaccess file I couldn't tell you if your redirects are correct, but finding the duplicate will most likely tell you what is causing it.

2
  • Added .htaccess for completeness. I'm also wondering if I'm just being too impatient. Maybe it will take a few days? Oct 9, 2018 at 14:05
  • 2
    that mod_rewrite is a typical redirect so no probs there. If your redirects are recent, they could take days or even weeks to update in the index depending on the crawl rate for your site.
    – garth
    Oct 10, 2018 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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