New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use bad canonical links #368

Open
pushcx opened this Issue Jun 12, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@pushcx
Member

pushcx commented Jun 12, 2017

On a story that was posted twice with a bad link, emmab suggested:

Modify Lobsters to not follow rel=canonical unless it can resolve a page with status 2**?

I think it's a good idea. I'm posting this issue for discussion and hopefully someone with free time can implement it.

@pushcx

This comment has been minimized.

Show comment
Hide comment
@pushcx

pushcx Jun 12, 2017

Member

For more context: a lot of sites have bad <link rel=canonical> tags in their headers. The two most common behaviors are pointing it at the homepage (they didn't understand what the tag is for) and not updating one that comes in a template (like in this story's case, pointing at username.github.com). I contact site owners to tell them about the bug when I can easily find contact info, but it would be nice if Lobsters could catch the second case.

Now that I write this up, I think we should probably also ignore any canonical link that points right to a domain name. It's the most popular failure mode, and if a Lobsters user is submitting a homepage with one the system would correctly use the URL they entered anyways.

Member

pushcx commented Jun 12, 2017

For more context: a lot of sites have bad <link rel=canonical> tags in their headers. The two most common behaviors are pointing it at the homepage (they didn't understand what the tag is for) and not updating one that comes in a template (like in this story's case, pointing at username.github.com). I contact site owners to tell them about the bug when I can easily find contact info, but it would be nice if Lobsters could catch the second case.

Now that I write this up, I think we should probably also ignore any canonical link that points right to a domain name. It's the most popular failure mode, and if a Lobsters user is submitting a homepage with one the system would correctly use the URL they entered anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment