Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Francielle 65 posts 279 karma points
    Dec 17, 2015 @ 10:49
    Francielle
    0

    Culture and Hostnames - 404 error

    Guys,

    I have a website with 3 roots (one for english, one for spanish and one for portuguese). Each node has a culture and hostname set, for example: EN: www.siteabc.net; ES: www.siteabc.es PT: www.siteabc.com.br

    My client bought a new domain www.siteabc.com, so we changed each culture and hostname to www.siteabc.com/en, www.siteabc.com/es and www.siteabc.com/br, as my client wants the customer to enter www.siteabc.com and be redirected to the correct language based on its IP address.

    In my test environment, I had no problem setting the hostnames for each language, but in my client's test environment, I got 404 error when entering www.siteabc.com/br, it worked for /en and /es.

    Do you guys have any idea what could be the issue?

    We also had issues with internal URLs, for example, we have a page www.siteabc.com/en/service/contact-us, and this page also faced 404 error, while www.siteabc.com/en/service didn't. It seems that having 3 levels on the URL is presenting issues. Again, I do not have this error for my test environment, so this may be some configuration on IIS.]

    I'm using Umbraco 7.1.8.

    Thank you.

  • gary 385 posts 916 karma points
    Dec 17, 2015 @ 11:12
    gary
    0

    Hi Francielle

    Suffered something very similar recently. Followed all tutorials etc, but could not get it to work.

    However, it now does work in this way.

    Top Node, only one top node with culture unset, ie the default EN-US, this is the Umbraco default language and for some reason, changing it on the top node threw errors.

    Then each following domain on level 2, with en/ with culture set to en-gb or whatever you need. As a check, in the layout file I used

    <html lang="@Model.Content.GetCulture()">
    

    This confirmed that indeed all was working as it should as well as setting the correct language in terms of page SEO.

    With regard to third level Url, just check in your navigation code that you are calling ancestorsOrSelf(2) or however you have arranged it, now that is your top-node for each site.

    It's kinda difficult to explain easily, but hope that it helps.

    Regards

    Gary

  • Francielle 65 posts 279 karma points
    Dec 17, 2015 @ 11:22
    Francielle
    0

    Hi Gary,

    Thanks for your reply.

    Currently my structure is as follows:

    • EN
    • ES
    • PT

    From what I could understand, your structure is:

    • Site
      • EN
      • ES
      • PT

    is that correct?

    I'm not sure if this is something viable for us to do, as the website is already live, but I'll check.

    Concerning the URL, I'll check if we are using AncestorOrSelf, but the third level URL does work in our test environment (which I have the same database as the test environment from my client), but does not work on their test environment., so I'm not sure if this is something concerning what method we use to retrieve the nodes.

  • gary 385 posts 916 karma points
    Dec 17, 2015 @ 11:32
    gary
    100

    Hi

    Yes, the structure is as you suggest. Although it appears many people seem to have managed it the way you have, I could not get anything like it.

    Depending on how big the site is, it is possible to re-arrange. I had the same structure but did the following.

    (I think I unpublished everything before I started, but can't remember exactly)

    Created a new doctype of topTopNode (allow at root), to replace the topNode, allowed children of type topNode and then created topTopNode and moved the others underneath. Then removed the allow at root from the topNode.

    Then reset the culture and hostname to reflect the en, pt etc, and then republished everything.

    It has always been my understanding that Umbraco only likes one topNode, this was pretty much confirmed with this. Unless of course I had missed a step along the way.

    I think I have seen others comment the same between test and deploy, like it will run in test but not live, so maybe with the re-arrange it will work, but the levels threw me for a bit.

    If I can help more, please let me know.

    Regards

    Gary

  • Francielle 65 posts 279 karma points
    Dec 18, 2015 @ 10:11
    Francielle
    0

    Hi Gary. Thank you for your help. We have always used multilanguage websites with the nodes on the root and had no issues, but we will start using the way you mentioned. I guess hostnames work fine if you have different domains for each language, otherwise it can present problems.

    Thanks again!

  • Mona 36 posts 106 karma points
    Jul 08, 2021 @ 07:32
    Mona
    0

    Dears,

    I'm facing issue with Umbraco Multi language website English & Arabic. English (en-US) is working fine as default language. Arabic (ar-SA) secondary language is not working, showing 404 error, page does not exist. Domains setting with Culture and Hostnames http://localhost:4865 http://localhost:4865/ar

    I did followed all steps in the below link: https://www.youtube.com/watch?v=-vzxCdjq4FM&ab_channel=UmbracoHQ enter image description hereenter image description hereenter image description hereenter image description hereenter image description here

    Please assist.

Please Sign in or register to post replies

Write your reply to:

Draft