Copied to clipboard

Flag this post as spam?

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


  • Vijay 12 posts 82 karma points
    Aug 04, 2023 @ 12:37
    Vijay
    0

    Single domain for multiple pages

    How can I set up a single domain for multiple pages in Umbraco and ensure that all pages redirect to the same domain? I'm encountering an issue where I receive a 'domain name already exists' error when attempting to manually add the domain names in the host names and cultures section. Is there a solution or workaround to achieve this setup?

    The attached image may get you clarity of my question

  • Marc Goodson 2097 posts 13921 karma points MVP 8x c-trib
    Aug 05, 2023 @ 10:45
    Marc Goodson
    0

    Hi Vijay

    If you have 'one domain' and multiple root nodes for sites, perhaps each site is for a different language/territory, then you can include the 'first' folder in the Culture and Hostname section.

    So if your domain name is 'super-vijay.com'... and you have three different versions of your site for English, French, Brazillian versions of your site, then for each of the root nodes for the three sites, you can add the appropriate culture and hostname combination

    eg

    super-vijay.com/en for English super-vijay.com/fr for France super-vijay.com/br for Brazil

    Any request for a page underneath the domain + first folder combination will be rooted to the content tree beneath the associated root node

    eg

    super-vijay.com/en/news/cool-stuff-here

    will be routed to the 'Cool Stuff Here' page created underneath News Created underneath your UK homepage...

    You can achieve a similar effect by not assigning any domains at all in Culture and Hostnames, for any node, (you can still set cultures) and then Umbraco will assume that there is only one site, with one domain, and if you add a property called 'umbracoUrlName' to your pages, this overrides the slug that is created for the page in the Url, and so for your site homepages you can give them a slug of 'en', 'fr' or 'br' to create the same effect as setting the Cultures and Hostnames in the first example.

    finally if everything is routing correctly and the domain warning is still there and you just want to turn it off, you can do so in appsettings in the content section by setting:

    "ShowDomainWarnings": false
    

    regards

    Marc

  • Vijay 12 posts 82 karma points
    Aug 07, 2023 @ 05:40
    Vijay
    0

    Hi Marc,

    But I want to add a duplicate page in the same culture and one is in the header and the other one is in the footer section.. But i need to link a same URL.. But when I'm adding in the url I'm getting that error... So is there any solution for placing one single url for 2 duplicate pages in the same culture..

    Thanks, Vijay

  • Marc Goodson 2097 posts 13921 karma points MVP 8x c-trib
    Aug 07, 2023 @ 14:33
    Marc Goodson
    0

    Hi Vijay

    Looking at what you are entering into Cultures and Hostnames in your screenshot, that seems wrong.

    You should only be putting a 'Domain' or 'Domain + First Folder' or setting a culture for a section in that dialog!

    What you seem to be saying, and I feel bad for not grasping completely, is that you want two pages, with duplicate content, in the same culture, with the same Url...

    ... but when a user requests the single Url, how will it know which duplicate page to send them to? and if they are duplicate pages, does it matter?

    When you talk about header and footer, do you mean the site navigation?

    If so, how are you managing the links that appear in the navigation?

    Do you have a MultiUrlPicker, that allows editors to specify the links? or a Content Picker? or is it based on convention (eg. first six pages in the site are the top navigation?

    So should just be a question of picking the duplicate page for the header and for the footer? or picking different versions of the page from a different section of the site?

    I am confused!

    regards

    marc

  • Vijay 12 posts 82 karma points
    14 days ago
    Vijay
    0

    Hi Mark,

    Allow me to clarify my query. I'm seeking guidance on the optimal approach for managing a static URL that must be utilized across all cultures for a single page. Where should this static URL be placed, and how can I ensure the page renders correctly across different cultures?

    Looking forward to your insights.

  • Danine Noble 57 posts 242 karma points
    14 days ago
    Danine Noble
    0

    Hey Vijay ^^

    Have you tried going through Umbraco's Adding Language Variants documentation?

    See the documentation linked for screen shots and the full walk-through including how to use it after setup. You do not create separate page items for each language; you use the language variant dropdown to adjust content for each language on the same page item :3

    If you want one language linked in one place and another elsewhere it should be as simple as just appending /en or /de (or whatever you set your lang hostname to) to the base url.

    If there is no language variant set for that language for the page then it will use the fallback -- so effectively doing what I think you're asking for? Just set the fallback language to be the version of the page you want to use for all languages.

    Hope that helps!

Please Sign in or register to post replies

Write your reply to:

Draft