+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Simplest news URL's

Simplest news URL's

4 posts, 0 answered
  1. Michel
    Michel avatar
    4 posts
    Registered:
    21 Jun 2011
    24 Jun 2011
    Link to this post
    We have a news section on our website (site.com/news) with a page that uses NewsView to display news items (site.com/news/latest-news.aspx). However, when you click on a news item, it leads to a URL with latest-news in it (site.com/news/latest-news/title-of-the-item.aspx). Because we also have a page with all the news items, there are now 2 ways of reaching a news item, with different URL's. This creates duplicate content for search engines.

    What we would like is the simplest form of news URL (site.com/news/title-of-the-item.aspx), but still be able to use both the latest news and all news items pages. What would be the easiest way to achieve this?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    24 Jun 2011
    Link to this post
    Hi Michel,

    You can change the urlFormat in the web.config News provider declaration

    <add name="News" urlRewriteFormat="[Publication_Date]/[Title].aspx"....

    Another option is using urlRewriting.

    Another option is excluding one of the widgets from the search engine and prevent the duplicate content in the search results.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Michel
    Michel avatar
    4 posts
    Registered:
    21 Jun 2011
    24 Jun 2011
    Link to this post
    Hi Ivan,

    Checking our web.config, I found that, as I expected, the urlRewriteFormat was set to [Title].aspx. This gives me the following URL: site.com/news/latest-news/title-of-the-item.aspx. Which makes sense as I'm trying to open it from the latest-news page.

    I've tried changing the urlRewriteFormat to "../[Title].aspx", which does give the correct URL: site.com/news/title-of-the-item.aspx. But then of course I get the 'resource cannot be found' error in the site. I should have known that wouldn't work..

    I could exclude the all-news-items links from the search engines using robots.txt (Disallow: */all-news-items would work) but ideally I don't want anything in the URL other than site.com/news/title-of-the-item.aspx so I think that urlRewriting is the option to research here.

    Unfortunately I don't have any urlRewriting experience with Sitefinity, so if you have some links or pointers to get me going solving this problem, they would be much appreciated. Thanks for your help!

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    24 Jun 2011
    Link to this post
    Hi Michel,

    In our user manual there is a section about "Advanced Url Rewriter"

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered