DEV Community

Saul Hardman
Saul Hardman

Posted on

A Word of Caution Regarding Cross-Posting To DEV

I cross-post all of my articles to DEV (soon to other platforms such as Medium and Hashnode as well) and am very happy to do so.

DEV provides the ability to set a <link rel="canonical"> pointing to the original article's permalink on the viewsource.io domain. Up until now this appears to have worked just fine with Google ranking my domain higher in the results than dev.to (if DEV is there at all).

However, my latest article seems to have fallen between the gaps somewhere as the DEV version of the article is the only one which displays in the search results for the search term "Managing access tokens with GitHub Actions":

A screenshot of Google search results showing only DEV article

The original article only appears in the search results if I navigate to the final page of results and click the 'search with the omitted results included' link:

A screenshot of Google with some copy stating that some 'very similar' results have been omitted

A screenshot of Google search results showing both the DEV article and the original article

Despite both pages containing a rel="canonical" link pointing to the same page, the original article appears to be falling foul of Google's duplicate content filters.

This is either an anomaly or (as I suspect) this has happened due to the DEV article being crawled and indexed before my site, meaning that the href attribute of the <link rel="canonical"> was to a page that was not indexed.

Given the drastic differences in the size of the 2 sites it's not unreasonable to presume DEV simply has a larger crawl budget and is indexed far faster than my one-person publication.

In order to avoid this outcome in the future I'm planning to adopt the policy of waiting at least a few days before cross-posting my articles.

What do you think DEV community? Is my theory sound? Those of you who cross-post: have you been bitten by this before? Do you cross-post immediately or wait some time?

Top comments (13)

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

I recently noticed this in my Google Search Console - there are 2 articles that I recently updated the canonical url to point to my new url and they show as "non-canonical" in the console though.

I guess I might start taking the 'wait a few days' approach to posting too πŸ™ƒ

Collapse
 
saul profile image
Saul Hardman

Thanks for the comment @terabytetiger , nice to have another data point – great username btw 🐯

Google Search Console was showing my article as having been crawled, but not indexed. I think the correct terminology is "Submitted by not indexed". I can't recall if I then manually requested indexing or if it was just indexed in time.

Interesting that your pages display as "non-canonical" πŸ€” Are they showing in Google Search Results at all?

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

Thanks! I recently choose the new name and am happy with it! πŸ˜„

This is the specific message I see:

Error Duplicate without user-selected canonical; Status: Excluded

It doesn't look like my site shows for this specific search - but I requested a manual re-index for the associated pages recently. Hopefully it will help 🀞

Thread Thread
 
saul profile image
Saul Hardman

Which articles is it that aren't showing up in the search results right now? Thanks for the screenshot πŸ‘ Could you let me know if the problem is resolved?

Side note (and sorry if things are WIP right now and you know this already): your Blog page renders fine on the first (SSR) render, but not when I click the links in the navigation (presumably CSR). The same goes for the Lessons page actually – seems to be an issue with invalid Dates.

Thread Thread
 
terabytetiger profile image
Tyler V. (he/him)

terabytetiger.com/lessons/articles... is one of them. I'll definitely be back if I find a solution πŸ˜„

Not sure I understand/am seeing the errors with the pages - everything seems to be working fine for me.

Do you get console errors or could share screenshots? Thanks for letting me know!

Thread Thread
 
saul profile image
Saul Hardman

Looks like you're not setting the <link rel="canonical" href="https://terabytetiger.com/lessons/articles/vue-rainbow/"> on that page? The metaInfo property on pages and templates should help you there πŸ‘

Here are the Errors that I see in the console:

Errors in console on blog page
Errors in console on lessons page

Thread Thread
 
terabytetiger profile image
Tyler V. (he/him)

Hmm, this is weird πŸ€” I don't see anything in Edge (Chromium) Beta on Windows. Which browser are you using?

I recently swapped out Moment for date-fns. Maybe that has something to do with it?

Thread Thread
 
terabytetiger profile image
Tyler V. (he/him)

Swapped back to Moment.js - maybe that solves it?

Thread Thread
 
saul profile image
Saul Hardman

Hi Tyler, that seems to have fixed it, yes πŸ‘·β€β™‚οΈπŸ‘

I'm using Firefox btw πŸ”₯ 🦊

Quick note on canonical tags:

a) they must be absolute i.e. prefixed by https://yourdomain.com/
b) they must be identical on both the DEV post and the original article (right down to the presence of trailing slashes)
c) they need to be <link rel="canonical" href="...">, not <meta>

A screenshot of a malformed canonical tag on terrabytetiger.com

Thread Thread
 
terabytetiger profile image
Tyler V. (he/him)

Oh yay! I'm glad it's working! πŸŽ‰

Thank you so much for the tips! I (clearly) have no idea what I was doing with these πŸ˜… This was extremely helpful πŸ’•

Thread Thread
 
saul profile image
Saul Hardman

You're very welcome Tyler! I've banged my head against this very wall so I'm happy to help you avoid doing the same πŸ˜…

Collapse
 
ben profile image
Ben Halpern

Yes, the big issue here is that Google treats the whole thing like a total black box. We do everything we can to have this functionality work for users, but all we can do is offer the functionality and it seems like it's not unilaterally followed by Google.

Here are some screenshots from our Google Search Console....

google

google

Collapse
 
saul profile image
Saul Hardman

Hey @ben , thanks for the comment and for shedding some light on the issue from your perspective.

I realise there's nothing more you can be doing on your end πŸ‘ The information that I'm gleaning from the screenshot goes against pretty much everything that I've just read about <link rel="canonical"> – black box indeed!

"Google selects a canonical URL only after a page is indexed" is a great insight though so, again, thanks for the comment. I'll trial-run my policy of waiting a few days (or at least until I know the original page has been indexed) before cross-posting and report back with the outcome – just for posterity's sake.