Developer forum

Forum » CMS - Standard features » Trouble with sitemap and “Redirect first page to ‘/’”

Trouble with sitemap and “Redirect first page to ‘/’”

Daniel Hollmann
Reply

Hi Dynamicweb.

We a multisite setup using the custom URL setting “Ensure unique paths for each area”, where each site as a unique domain (See attachment). Since we have multiple pages named the same on each page, and we would like to avoid the -1 endfix, Dynamicweb provides if unchecked.

 

We also have setup each website to “Redirect first page to ‘/’” (See other attachment). However, this gives a problem in the sitemap generated by Dynamicweb. The Firstpage real URL is now “/” but in the sitemap it still using the URL generated by Dynamicweb, which uses the page name.
Let’s say our first page is called “frontpage” it then gets the URL by the Dynamicweb engine of “/frontpage”, but since we have the “Redirect first page to ‘/’”, the real URL is “/”. However the one in the sitemap says “/frontpage”.

The URL “/frontpage” redirects to “/”, the best SEO-wise is to have the correct URL in the sitemap.

We then tried to go the Page property and change both “Use in URL” and “Exact URL for this page” and set it to “/”, but then the URL engine generates a URL  like this “/-1”, and then that is the one used in the sitemap. So is there any way to set the exact value of a page in the sitemap, so we can make sure that the real URL for our frontpage is correct?

Bh Daniel
Nexusone.

2022-04-07_10h09_35.png 2022-04-07_10h29_14.png

Replies

 
Nicholai Pedersen
Reply
Hi everyone,
Daniel found a solution to this forum thread via the steps below :
 
  1. Create a new page
  2. Change page layout to text/xml
  3. Choose page layout template (Swift_Sitemap.xml.cshtml): https://github.com/dynamicweb/Swift/blob/main/Swift/Files/Templates/Designs/Swift/Swift_Sitemap.xml.cshtml
  4. Choose exact url on page properties to sitemap xml

...And some manual work in addition to the steps above. 

BR/

NWP

 

You must be logged in to post in the forum