WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
Language code in URLs: to be or not to be? (17 posts)

  1. Baz11
    Member
    Posted 1 year ago #

    What is the best structure of URLs with Polylang?
    Google says here http://support.google.com/webmasters/bin/answer.py?hl=en&answer=182192#1 : "Make sure each language version is easily discoverable. Keep the content for each language on separate URLs." It means that Google prefer URLs with language code (such as en/ or de/).
    But without language code URLs are more pretty.
    What is Your opinion about this?

    http://wordpress.org/extend/plugins/polylang/

  2. andrejcremoznik
    Member
    Posted 1 year ago #

    Who are URLs for? How often do you enter URLs manually in the address bar?

    Do you think users care about short/pretty URLs when sharing? No. I see youtube links with a bunch of parameters pasted all around. Nobody really cares.

    So i'd say your priority should be making google happy. :)

  3. Baz11
    Member
    Posted 1 year ago #

    What about SEO advantages of URLs with language parameter and without it?

  4. Baz11
    Member
    Posted 1 year ago #

    Now I'm using URLs with language parameter for non-default languages and default language - without it.
    When I will change default language I will need to do 301 redirect for all old- and new-default language posts and pages.
    It seems that structure without parameter for all language is better.
    But from other side Google advice is "Keep the content for each language on separate URLs".
    Question is open....

  5. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Keep the content for each language on separate URLs

    Yes it's what Polylang does, whatever the settings you use. It does not mean that you *must* add the language code to urls. Sometimes it is necessary (for archives for instance), sometimes it is not (for posts or pages).

  6. Baz11
    Member
    Posted 1 year ago #

    Chouby, I'm glad to see You, as always :!)
    This means that without lang parameter all requirements of Google will also be carried out?
    I just want to change the default language of site with time. Redirection is a good thing, but sometimes, when it used, site can lose position in search engines.
    That is why I choose URL structure so closely.

  7. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    I am not a Google expert. But I would be very surprised that Google cares about the language information in url more than the content of the page in which the language is defined at the second line just below the DOCTYPE and above the <head> section.

    However you are right to choose the permalink structure carefully as it will be painful to change it in the future.

  8. Baz11
    Member
    Posted 1 year ago #

    Is it means that language parameter in URL is necessary?

  9. Baz11
    Member
    Posted 1 year ago #

    I wanted to change my permalinks to structure without language parameter, but now I don't know what to do...

  10. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Is it means that language parameter in URL is necessary?

    No. Both options are available in Polylang: You have the choice to add (or not) the language parameter in the urls for posts, pages, categories and post tags. As each of them has already a unique url, it is not necessary to add the language parameter.

    However, you will notice that the language parameter is always added to the urls for archives. It is necessary to differentiate (for example) English monthly archives and German monthly archives.

  11. Baz11
    Member
    Posted 1 year ago #

    I understand that.
    But I am interested in the position of search engines. What structure is better for them? As I understand from Your post above, Google prefer lang parameter on URL or I misunderstood?

  12. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    I believe that search engines don't care and most probably do not interpret the language code in url. Why /de/ in an url should be automatically interpreted as a German page? It could be whatever else. But again, I am not a search engines expert...

  13. Baz11
    Member
    Posted 1 year ago #

    Hmm... This is an interesting question not only for me.
    Maybe it is sense to ask someone of search engines representatives?

  14. nobugames
    Member
    Posted 1 year ago #

    Hi there, I do not mean to hijack this thread here but I noticed that I cannot switch off language codes in URLs even though I selected the option "The language is set from content. Posts, pages, categories and tags urls are not modified.".

    This is currently a problem because a theme I'd like to use does not show its front page because Polylang always appends a language code.

  15. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Do you mean that the language code appears on single post urls?

  16. nobugames
    Member
    Posted 1 year ago #

    It is meant when I try to access the front page on my WordPress installation. So when I type:

    http://www.my-wordpress-install.com/

    it automatically redirects to

    http://www.my-wordpress-install.com/en

    The Polylang setting is basically being ignored on my installation.

    Anyway, I switched to a different theme that doesn't have the problem I mentioned earlier.

  17. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Yes. There must be a different url for the frontpage for each language. So the language code must be added to it, even if you choose not to add the language code to all urls. This is the same for archives. Only posts, pages, categories and tags are concerned by the option you mentioned.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.