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

No canonical tag #873

Open
GaryStanton opened this Issue Jun 26, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@GaryStanton
Contributor

GaryStanton commented Jun 26, 2018

I found an issue with the search, whereby entering a / before your search term would result in the browser being redirected outside of the domain. (#872)
Whilst playing with this, I noticed that some other characters are filtered out, so if you were to type $£cfimage you'd end up at https://cfdocs.org/$£cfimage - however the content shown would be identical to https://cfdocs.org/cfimage. This is nice, but I noticed there are no canonical tags on the pages and thus search engines might see this as duplicate content. Feasibly someone could publish multiple links to the same page with different URLs, and that might harm the site rankings.
Probably not a great deal, and it's unlikely... but still.

I think ideally if the request handler can figure out which content to display, it should issue a 301 redirect to the canonical URL of that content (if the current URL doesn't match the canonical).
If not, at least adding a canonical tag would resolve the SEO issue.

@shaedrich

This comment has been minimized.

Show comment
Hide comment
@shaedrich

shaedrich Jun 26, 2018

Contributor

I didn't get redirected by doing this. Instead I got this js error message:

Uncaught DOMException: Failed to set the 'href' property on 'Location': '//' is not a valid URL.

I agree with the 301 redirect suggestion 👍

Contributor

shaedrich commented Jun 26, 2018

I didn't get redirected by doing this. Instead I got this js error message:

Uncaught DOMException: Failed to set the 'href' property on 'Location': '//' is not a valid URL.

I agree with the 301 redirect suggestion 👍

@GaryStanton

This comment has been minimized.

Show comment
Hide comment
@GaryStanton

GaryStanton Jun 26, 2018

Contributor

What browser are you using? I get redirected in FF and Chrome.
I made a pull request for that though. ;)

Contributor

GaryStanton commented Jun 26, 2018

What browser are you using? I get redirected in FF and Chrome.
I made a pull request for that though. ;)

@shaedrich

This comment has been minimized.

Show comment
Hide comment
@shaedrich

shaedrich Jun 26, 2018

Contributor

I am redirected as well when I enter something after the slash, too. I just misunderstood you but got it when I read your pull request ;)

Contributor

shaedrich commented Jun 26, 2018

I am redirected as well when I enter something after the slash, too. I just misunderstood you but got it when I read your pull request ;)

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