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

Forums / Developing with Sitefinity / submitting webmaster files and xml

submitting webmaster files and xml

22 posts, 2 answered
  1. Richard
    Richard avatar
    12 posts
    Registered:
    26 Jan 2011
    27 Jan 2011
    Link to this post
    Hi guys,

    I'm new on this cms and I'm wondering how can I upload my generated verification files from google to my site made from sitefinity. As well as uploading my sitemap.xml file. I just need the root place to upload these files. Thanks in advance.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    01 Feb 2011
    Link to this post
    Hi Richard,

    Thank you for using our services.

    As far as I can understand, the verification from Google requires a specific meta tag to exist on your pages. You can add this meta tag on your pages from the page's properties screen. In Sitefinity/Pages click the Actions menu of a page and go to Title and Properties -> Advanced options and configure the custom meta tag.

    As for a SiteMap - you can create your own dynamic sitemap by using the Sitefinity Pages API to get all pages. Bellow is some sample code which generates sitemap for search engines. You will have to provide your logic for setting priority of pages. You can add the handler to your website root and then call it.

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Richard
    Richard avatar
    12 posts
    Registered:
    26 Jan 2011
    02 Feb 2011
    Link to this post
    Hi Radoslav,


      Thanks for that information. Though I might be lost in this now (lol), Google, Yahoo, and Bing gave me an html files that I should be putting on my root folder and I do really appreciate giving me that information but I was looking where root folder should I upload those files so that when I access my site with that name I could find them. Yes, if you noticed I'm doing some SEO for my site and that includes sitemap.xml, verification files from my webmaster accounts in Google, Yahoo, and Bing for those search engines look at my website and some other stuffs such as website content and meta tags. 


      Also, regarding the sitemap of my website, am I really required to stuffs like programming? Coz I have a tool here that can generate the sitemap.xml for me then what I only need to do is save that file and put it on my root folder. I just want to save time programming codes to generate my sitemap.xml. I noticed too that if I try programming to show the list of my pages on my site, (like what I've seen in this tutorial http://www.sitefinitywatch.com/blog/09-08-20/Sitefinity_API_Tips_amp_Tricks_Webinar.aspx) I don't have the option to arrange them in hierarchy. Like for example, Services menu -> List of services -> etc. Coz most of the sitemaps are organized from menu to small pages. 


      Sorry got some lots of question I had for you. Thanks! =)



    Regards,
    Richard
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    05 Feb 2011
    Link to this post
    Hi Richard,

    The root of your webiste is the starting folder of the website, folder which contains the web.config file. You should place webmaster files. If you have a tool which generates xml file for sitemap, how do you ensure that it is always up to date? You have to run it each time you create/delete pages. With the code I have provided you just have to give the search engines the path to the sitemap.ashx file and they will automatically read its xml output.

    Regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Richard
    Richard avatar
    12 posts
    Registered:
    26 Jan 2011
    07 Feb 2011
    Link to this post
    Hi Radoslav,

       Thank you so much for your patience answering these questions. But I got some last two questions if you don't mind. First I just want to ensure if I place my webmaster files on that folder where web.config file resides, will the search engines be able to read them? Coz when I tried to, let's say the file name is mywebfile.htm, access them like www.mywebsite.com/mywebfile.htm I don't seem able to access them. And there's some part on google webmaster that after you upload that file to the root folder of your site you need to click on verify and google seems unable to find that file and says "unable to verify your website". Usually I do same procedure on some sites but this time the file is unreadable from the root folder where web.config resides. And lastly, I'm really not familiar where to put those codes you provided and so can you or do you have any clear steps on how will I or where will I put those codes? Coz I don't know how I will give to search engines the path of the sitemap.ashx. I'll be good to go with just those two questions. Thank you. =)


    Regards,
    Richard
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    08 Feb 2011
    Link to this post
    Hello Richard,

    Thank you for getting back to me.

    Do you return a 404 (item not found error) when you try to navigate to the htm file? If this is the case then you need to open up IIS and go to your website in IIS. Then go to Handler Mappings and make sure that there is a mapping for the .htm extension. If there is no such mapping you have to map it to the aspnet_isapi.dll for .NET 4.0.

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  7. Richard
    Richard avatar
    12 posts
    Registered:
    26 Jan 2011
    09 Feb 2011
    Link to this post
    Hi Radoslav,

    Hope you had a great day.

    Thank you so much for that information. I'm not good in this you know but I'm really trying to learn more and that helps me a lot. By the way, how about the code you gave me? I'm having a little trouble with the steps where I need to code that.

    Thanks,
    Richard
  8. Richard
    Richard avatar
    12 posts
    Registered:
    26 Jan 2011
    09 Feb 2011
    Link to this post
    Hi Radoslav,


    I get it now. I saw the term Sitefinity Pages API from your previous reply. Anyway thank you so much for helping me here. I really appreciate it. These solves my problem now. Thank you. =)



    With kind regards,
    Richard
  9. Richard
    Richard avatar
    12 posts
    Registered:
    26 Jan 2011
    09 Feb 2011
    Link to this post
    Hi Radoslav,

    Just a minute. I thought of if I use your code to create a sitemap, does this include the pages that aren't being used?


    Thanks,
    Richard
  10. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Feb 2011
    Link to this post
    Hi Richard,

    Can you please clarify on what you mean by pages that aren't used? The code in the sample SiteMap checks for live pages as well as for pages that are set as to be shown in navigation.

    Best wishes,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. Richard
    Richard avatar
    12 posts
    Registered:
    26 Jan 2011
    15 Feb 2011
    Link to this post
    Hi Radoslav,

    Thanks a lot. That actually answers my question. I was talking about pages that aren't in navigation. =)


    Regards,
    Richard
  12. ZK
    ZK avatar
    23 posts
    Registered:
    23 Nov 2010
    24 Mar 2011
    Link to this post
    Radoslav,

    I'm trying to use the code you linked, but I'm only getting a partial sitemap--the XML just stops outputting part way through. Any idea what might be happening?

    Thanks!
  13. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    24 Mar 2011
    Link to this post
    Hello Zak,

    Can you try break pointing the code to see if fails execution somewhere?

    All the best,
    Radoslav Georgiev
    the Telerik team
  14. ZK
    ZK avatar
    23 posts
    Registered:
    23 Nov 2010
    24 Mar 2011
    Link to this post
    Hi Radoslav,

    I'm getting a NullReferenceException on the following line:

    var pages = App.WorkWith().Pages().LocatedIn(Telerik.Sitefinity.Fluent.Pages.PageLocation.Frontend).Where(p => p.Page.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live && p.ShowInNavigation == true).Get().ToList();
    

    Specifically, in the Where clause.
  15. ZK
    ZK avatar
    23 posts
    Registered:
    23 Nov 2010
    25 Mar 2011
    Link to this post
    Additional info: it looks like p.Page in the Where method is null when p is a grouping page, and that's the null reference. My LINQ skills aren't that awesome but I'm going to see if I can figure out how to ignore those.
  16. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    25 Mar 2011
    Link to this post
    Hello Zak,

    p.Page is the PageData, but the group pages do not have page data object and this is why an error is thrown. You need to escape the group pages in the loop.

    All the best,
    Ivan Dimitrov
    the Telerik team
  17. Byzza
    Byzza avatar
    89 posts
    Registered:
    09 Jul 2007
    04 Jul 2011
    Link to this post
    how do I go about escaping the group pages?  I think I'm getting the same error.

    Thanks
    Byron
  18. Byzza
    Byzza avatar
    89 posts
    Registered:
    09 Jul 2007
    04 Jul 2011
    Link to this post
    Just for reference, I have tried change the problem line to what I have below but it doesn't seem to have done anything. sorry I haven't used Linq before so I might be way off the track here. (bolded and italics the part added)

    var pages = App.WorkWith().Pages().LocatedIn(Telerik.Sitefinity.Fluent.Pages.PageLocation.Frontend).Where(p => p.Page.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live && p.ShowInNavigation == true && p.NodeType == Telerik.Sitefinity.Pages.Model.NodeType.Standard ).Get().ToList();
  19. Byzza
    Byzza avatar
    89 posts
    Registered:
    09 Jul 2007
    04 Jul 2011
    Link to this post
    Its ok, It appears I might have worked it out.  looks like order is important

    For others this is the line to use (added section which is bolded and italic)

    var pages = App.WorkWith().Pages().LocatedIn(Telerik.Sitefinity.Fluent.Pages.PageLocation.Frontend).Where(p => p.NodeType == Telerik.Sitefinity.Pages.Model.NodeType.Standard && p.Page.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live && p.ShowInNavigation == true).Get().ToList();
  20. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    15 Jul 2011
    Link to this post
    p.NodeType == Telerik.Sitefinity.Pages.Model.NodeType.Standard does bring in some data, but it does not appear to be what I would expect to see in a sitemap file.

    Let's say that I have root level pages of "about, service and stuff".  Then I have a group page "Information" that contains child node pages of "Contact Info, forms and etc". 

    Running the sitemap.ashx with this change will only result in showing me "About, service, stuff" when I would want to see "About, service, stuff, contact info, forms and etc".  I am going to play with it some more, but I am guessing we need to loop through more to target children of a NodeType.Group, but not include the actual group page itself.

    EDIT:  Well this wasn't exactly true.  The reason I was not seeing the others was due to the check on whether they can be viewed in navigation.  Taking that out does bring the rest of the pages in, but I can see where it gets tricky on how you decide if it should be in there or not. 

    For instance I have a login page that is not set to show in navigation and is now in the sitemap, when I do not need it there.  Putting the navigation check back in will handle this, but then I will loose my sub-pages that are not part of the main navigation, but should be indexed.

    Any thoughts or suggestions?  Maybe check if "Allow to be indexed" is set?
  21. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    15 Jul 2011
    Link to this post
    Ok, here is what I am using as it meets what I was looking for, but I can see where this could be a situational thing depending on how people want to handle things.

    var pages = App.WorkWith().Pages().LocatedIn(Telerik.Sitefinity.Fluent.Pages.PageLocation.Frontend).Where(p =>
                        p.NodeType != Telerik.Sitefinity.Pages.Model.NodeType.Group &&
                        p.Page.Crawlable == true &&
                        p.Page.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live
                        ).Get().ToList();
                    pages.Sort((x, y) => x.Ordinal.CompareTo(y.Ordinal));
  22. Enterprisefinity
    Enterprisefinity avatar
    6 posts
    Registered:
    04 Aug 2011
22 posts, 2 answered