When pages are connected to multiple links allover the project – for example by using keywords – you will end up with one page published multiple times in several folder. This leads to duplicate content and search engines like Google, Yahoo, Bing, … basically any engine crawling your page will assume that you are trying to get a higher ranking by duplicating your content and keyword density. This can unfortunately lead to a full exclusion from Google’s search index and none of your pages within your domain would be found. Disturbing, isn’t it?
So why does the publishing of multiple pages happen?
Let’s have a look at the architecture of link elements within the Web Solutions Management Server
The PageBuilder is the core piece which follows the link structure of your Content Management Project and verifies every link and page within your project. Beside that the PageBuiler has been rewritten recently in .NET and shows now a performance than before when configured properly.
There are two or furthermore three types of link elements:
During the publishing process within WSMS
RedDot CMS referenced links are not followed by the PageBuilder and hence don’t produce a published page follwing this link.
Connected pages to links are recognized by the PageBuilder which picks up the publication package assigned to the link and according to the settings in this package the page gets published. If a page is connected multiple times in a project, not just referenced, this structure creates multiple pages with the same content.
We will convince the CMS PageBuilder that it is looking at a reference instead of a connected page link. The code for this is easy:
The only limitation here is:
What the code does is that it replaces the link type
<ul id="following-pages"> <!IoRangeList> <li> <h3><a href="<%!! Context:Pages.GetPage(Guid:<%info_PageGuid%>).GetUrl() !!%>"><%hdl_pagetitle%></a></h3> <!IoRangeNoRedDotMode><!IoRangeRedDotMode><!-- 'treat the link as reference not as link to avoid duplicate publishing <%=Replace("<%list_teaser%>","islink=2","islink=10")%> --><!/IoRangeRedDotMode><!/IoRangeNoRedDotMode> <p><%stf_metadescription%></p> </li> <!/IoRangeList> </ul>
Attention: Don’t forget to wrap the code above in a pre execute
<!IoRangeNoRedDotMode><!IoRangeRedDotMode><!-- 'treat the link as reference not as link to avoid duplicate publishing <%=Replace("<%list_teaser%>","islink=2","islink=10")%> --><!/IoRangeRedDotMode><!/IoRangeNoRedDotMode>
This code hides the link from the HTML structure. Although it is hidden now from the HTML it doesn’t stop the PageBuilder from following the link and publishing the page, so we have to replace the two link types as discussed above.
Render Tag Code? What do we do here with the Render Tag?
<%!! Context:Pages.GetPage(Guid:<%info_PageGuid%>).GetUrl() !!%>
This nice Render Tag sets the link URL to the MainLink of the page. If this is used everywhere all links will point to the same place and make sure that you won’t have duplicate content or unwanted sites published in the wrong place.
I am sure there are of course other ways to solve this issue and I am keen to read them below!
No related posts.