Skip to content
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

HTML tags for search engine crawlers #10

Open
pi0neerpat opened this issue Jul 8, 2020 · 3 comments · May be fixed by #13
Open

HTML tags for search engine crawlers #10

pi0neerpat opened this issue Jul 8, 2020 · 3 comments · May be fixed by #13
Assignees

Comments

@pi0neerpat
Copy link
Collaborator

pi0neerpat commented Jul 8, 2020

Thoughts on adding a feature to generate HTML tags describing alternate language versions of each page?

I'm not sure if its necessary to do this, but my gut tells me its probably a helpful feature. This way, Google and other search engines will be able to serve the most relevant language version of a site.

See HTML section here: Tell Google about localized versions of your page. This seems like the easiest method.

It would really suck to spend time making a site multi-lingual, only to have it not appear correctly in searches

@pi0neerpat pi0neerpat changed the title HTML tags for Google Crawlers HTML tags for search engine crawlers Jul 8, 2020
@herecydev
Copy link
Owner

Yep, I spiked making the "sitemap.xml" work a while back which I think is ultimately the best solution. But this is definitely the easier one, and it'll be nice to support both models.

I'll take a look when I find some time

@herecydev herecydev self-assigned this Jul 8, 2020
@herecydev herecydev linked a pull request Jul 22, 2020 that will close this issue
@herecydev
Copy link
Owner

@pi0neerpat sorry this took a little longer than expected. Do you want to check the PR and see if that configuration matches your expectation. I still need to double check the technical implementation but I think it's working as expecte

@pi0neerpat
Copy link
Collaborator Author

This is awesome! Thanks so much for doing this.

I read through the link I posted above again, and the only thing that might be needed is x-default. Personally I don't think I need it, since I am automatically redirecting to the default language, based on a whitelist. So I'll leave it up to you.

The reserved value hreflang="x-default" is used when no other language/region matches the user's browser setting. This value is optional, but recommended, as a way for you to control the page when no languages match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants