The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Local Website Optimization
    4. What are SEO best practices for Java Language Redirections?

    What are SEO best practices for Java Language Redirections?

    Local Website Optimization
    2 2 54
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • skrauss
      skrauss last edited by

      We would like to get some insight on what is the best practice of setting up canonical URLs in the below scenario.

      CMS used: Liferay – we believe they are using java. The URL structure at this stage can not be changed to best practices (/en/ and /ar/). Currently the language redirections works like this:

      English: https://www.website.com/page1?AF_language=en

      Arabic: https://www.website.com/page1?AF_language=ar

      Depending how you entered the website last time the root URL will show English or Arabic content without the ‘sufix’:

      https://www.website.com/page1

      All 3 different URL’s are being indexed on Google - which is causing duplication and confusion.

      We have a few ideas:

      Have 2 main URLS:

      https://www.website.com/page1?AF_language=en and have the canonical set to https://www.website.com/page1?AF_language=en

      https://www.website.com/page1?AF_language=ar and have canonical set to https://www.website.com/page1?AF_language=ar

      However, how would you handle the root page which does not have a specific language attached. If we need to make a choice we would go with Arabic, as mainly Arabic pages are indexed on Google with the root domain. This way we would (hopefully) retain the rankings for this.

      Question: did anybody had to deal with a similar situation? What would you do in a similar situation and why?

      Thanks for all your input.

      1 Reply Last reply Reply Quote 0
      • effectdigital
        effectdigital last edited by

        Quite an old style of architecture, it's a shame it cannot be changed. Just so others understand a bit more, what you refer to as a 'suffix' is actually called parameters. In a URL, anything following "?" is parameters

        If the language on the root is dynamic (it changes) then it's very difficult for you to hreflang to it effectively as it will conflict the the parameter URLs (which are language based) AND additionally, you won't know for certain what language to hreflang to. That also makes canonicals to the root quite tricky IMO

        I think what you are already doing, is the best of a bad situation. At least the parameter-based URLs set a designated language which you can rely on to be the same

        If you look at this official URL from Google: https://support.google.com/webmasters/answer/182192?hl=en

        Scroll down until you find the heading "Using locale-specific URLs" and look at the table underneath of that heading

        Parameter-based geo-targeting, is actually the only one of of multiple architectures, which Google put in red text and explicitly warn people away from. Since the site you are looking at has crossed that red line, you may need to manage expectations about results. If they're going to pick the worst possible format and stick with it, without asking you as a consultant what is best, they've kind of shot themselves in the foot there

        P.S: Regarding 'actual' redirects, not canonicals. For sites that have proper sub-folder structure, usually you redirect users based on their location, but allow them to flag select to 'escape' the redirections (which can sometimes go wrong). You also usually exempt Google's user-agent ('googlebot') from regional redirects, as they can only crawl from one location at once and otherwise they think areas of your site keep going up and down due to all your redirects. But with your structure, I'm not sure I would even touch redirects. It's in enough of a state as it is without rolling those dice

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        • SEO Best Practice for Managing a Businesses NAP with Multiple Addresses
          MiriamEllis
          MiriamEllis
          1
          4
          358

        • Keyword Tool Best Practices
          NewSEOguy
          NewSEOguy
          0
          3
          145

        • Best SEO practice for project galley (image gallery) ? I need SEO Professionals advice.
          Mishel298
          Mishel298
          0
          8
          258

        • Best Practices: Different Phone Numbers on the Same Website
          MiriamEllis
          MiriamEllis
          0
          7
          985

        • Local SEO Best Practise?
          UmairGadit
          UmairGadit
          0
          5
          107

        • Local SEO In A Different Language
          renehansen
          renehansen
          0
          3
          182

        • Local franchise seo strategy. what could be the best practice?
          MiriamEllis
          MiriamEllis
          1
          2
          593

        • What is the best type map for local SEO?
          Ideas-Money-Art
          Ideas-Money-Art
          0
          3
          151

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy