Fixing SEO for dApps

in #utopian-io6 years ago

Condenser is the code the powers Steemit. I made an improvement to canonical linking:

On the Steem network, dApps have historically had an issue: search engines. With so many dApps, it's impossible for Google to decide what dApp to show for a post. Google had no way of knowing that DTube videos were to be shown on DTube, and not Steemit, as DTube videos are made as Steem posts.

However, there is a solution: the canonical tag. Websites can specify what URL the content was posted on originally. Historically, Steemit has set the canonical tag on Steemit posts to be Steemit, even if the post wasn't made on Steemit. Because Steemit is the most popular dApp, and the first, Google believes that other dApps are stealing Steemit's content, which is wrong.

However, there is a solution. Almost every dApp embeds the name of the app used to create, into the post. It doesn't put it directly in the post (some do, but most don't), but in the JSON metadata. This metadata section doesn't get displayed directly to those reading a post, but still contains important data. For example, it includes the tags of the post. This is also where dApps put the name and version of themselves.

I changed the code that runs Steemit (called Condenser), to change how it makes canonical links. Now, it parses the JSON metadata, and sees if it finds a dApp it knows about. If it does, it puts the link to the post that would be used on that dApp, in the canonical URL. It gets the list of dApps from the Steem Script library.

Here's what the canonical tag looks like now, on Steemit:
image.png

I did this in Condenser PR #2947.

Proof that this was me

Sort:  

Great explanation of the problem and good solution with the tests. Thank you for making then condenser a better place. :)

I had to score commenting question low since there are no comments in the changeset you have brought. Its weight is small but keep in my mind for future contributions. Even though the code is clear and straight-forward, this CanonicalLinker.js may get some comments about the logic.


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @emrebeyler!

So far this week you've reviewed 11 contributions. Keep up the good work!

I have done some SEO in the past, if you google search crypto con Denver 2019 my blog shows up first. I think it has been positively affected by the amount of up votes. Thanks

Hi bro, so how does it work? do you add it to your code? does one do a pull request to your steem script? e.g there is https://ulogs.org and I also have https://steemgigs.org

I don't maintain the Steem Script library, my code just imports it. The main part of the code is in CanonicalLinker.js, which is a generic function that can be moved to other projects easily. The only thing I would change is the fallback domain on line 4. Ulogs/SteemGigs would probably want to use themselves as a fallback. (the fallback is used in case the script can't figure out what app made the post).

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by smitop from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

Please Remove your Vote , Evidence found this Account are up to No Good!

Retracted.

Who is running this stupid account?
Definitely not a bot?
When a phisher post something, how fast are you guys in action?
I forgot, no one Read anyway

What did I do? I just told someone that they should vote for witnesses. That's the real link to vote for witnesses.

What are you getting out from witnesses?
Wallet spamming is bad!
Could be mistaken for hackers

I'm not getting anything out of this; I just want to improve the Steem network. While wallet spamming can be bad in some cases, such as for phishing/advertising, I don't see any issue here.

I can assure you that I'm not hacking into every account that isn't voting for witnesses. I also clarify what happened to users, who receive my messages, if they ask.

A lot of people thinks you hacked into their accounts.
They Reported to me.
I will remove, one flag and follow up your account.

Hi @smitop!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Please Remove your Vote , Evidence found this Account are up to No Good!

also bro, may I please ask if you are versed with react js?

I've used vanilla JS for a while, I don't have too much experience in React specifically.

Congratulations @smitop! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemitBoard - Witness Update

Support SteemitBoard's project! Vote for its witness and get one more award!

Hey, @smitop!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Please Remove your Vote , Evidence found this Account are up to No Good!