-
Notifications
You must be signed in to change notification settings - Fork 152
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
Prefix urls with the language to improve SEO #133
Comments
I plan to use translation later with buffalo, and this type of urls is compulsory for SEO. |
@hubyhuby I plan to change the i18n middleware a bit, to allow customized extractors for the language:
I'd like to have a way to set priority for extractors too (first session, then cookie, and so on). Keeping the same default as now should be enough to keep back-compatibility. |
Hi @stanislas-m , As I understand the "?lang=en" is not something search engines like. As of today... My personal experience with the last website launch 4 motnhs ago, is that subdomains like "en.gobuffalo.io" works well in google. If I am in spain and try to reach my french website it will show on google "en.gobuffalo.io" (and not "gobuffalo.io" ) in first page. (I don t have a spanish website so it defaults to EN) Conerning your technical question, as I didn t used it yet, I don t have a vlue ;) |
@hubyhuby I've reworked the i18n middleware a bit here: gobuffalo/buffalo#957 (and here is the way to use the new URL prefix language finder: https://github.com/gobuffalo/buffalo/blob/ef75e1dfa8c2bec86ad07aea7ca2f5b2feb5acca/middleware/i18n/i18n_test.go#L33) It should allow to manage the subfolder way, and make the language finding easier to extend. I'm not sure Buffalo allows to run multiple domains / subdomains from now, but if not you can ask for this feature in the Buffalo repo. :) |
Since this specific point is resolved, I close this issue. @hubyhuby if you want a support for subdomains, please add an issue in the buffalo repo. :) |
The docs are only indexed in english. To improve the SEO, it can be a good thing to have different URLs for the french and future versions.
For instance, https://gobuffalo.io/docs/new-project can still be the english (default) version, and the french version will be https://gobuffalo.io/fr/docs/new-project
The text was updated successfully, but these errors were encountered: