Ruby on rails sitemap.xml structure
-
Is their a recommended way/best practice to implement sitemap.xml files on a site built with ruby on rails?
-
XML sitemap is well defined here:
http://www.sitemaps.org/protocol.htmlBut i can quickly resume:
- limitation up to 50000 URLs and up to 50MB as file. If you need more you can split them as sitemap index with several sitemaps.
- sitemap index are up to 50000 sitemaps and up to 10MB as file.
- lastmod, priority and change frequency didn't play HUGE role anymore: https://www.seroundtable.com/google-lastmod-xml-sitemap-20579.html https://www.seroundtable.com/google-priority-change-frequency-xml-sitemap-20273.html but just keep them to be fully formatted.
- sitemaps can be compressed (gzip)
- sitemap must be UTF-8 encoded but beware of entities - Ampersand, Single Quote, Double Quote, Greater Than, Less Than. You must replace them with % char codes.
- you can put sitemap location in robots.txt. You can place there also few sitemaps. Sitemaps can be located on 3rd party servers too.
I think that this is most important in XML sitemaps.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
This url is not allowed for a Sitemap at this location error using pro-sitemaps.com
Hey, guys, We are using the pro-sitemaps.com tool to automate our sitemaps on our properties, but some of them give this error "This url is not allowed for a Sitemap at this location" for all the urls. Strange thing is that not all of them are with the error and most have all the urls indexed already. Do you have any experience with the tool and what is your opinion? Thanks
Intermediate & Advanced SEO | | lgrozeva0 -
URL structure for SEO
Hi Mozzers, I have a site which is a combination of product pages, and news and advice pages that relate to the products. How would you approach the URL structure for this, following SEO best practice? Approach 1 Product pages:
Intermediate & Advanced SEO | | A_Q
www.website.com/product-category/product-page News and advice pages:
www.website.com/product-category/product-page/news-and-advice-story-1
www.website.com/product-category/product-page/news-and-advice-story-2
etc or Approach 2 Product pages:
www.website.com/product-category/product-page News and advice pages:
www.website.com/news/product-category/news-and advice-story-1 (with internal linking to relevant product page)
www.website.com/news/product-category/news-and advice-story-2 (with internal linking to relevant product page)
etc Or would a different approach be better?0 -
Process for moving existing articles to new structure (URLs, titles, etc)
I am in the midst of a major redesign of my site, including revamping existing articles . I have a couple of hundred articles and I am reviewing all aspects of these articles, including titles, URLs, content, etc. I am putting together a process as I move each article across to the new site and have SEO very much in mind. I'd appreciate any feedback on this. First off, let me be clear that I consider the quality of the content paramount. Anything suggested below is considered "supporting" (that content) from an SEO perspective. But, since I am moving this content across, I may as well take the opportunity to clean things up. The existing articles don't have particularly good SEO-related attributes, in terms of their titles, URLs, use of keywords and so on. So, I plan to do the following for each article. For illustrative purposes (our site serves the wedding industry), I will use an article about how to involve children at a wedding. Questionsunder each bullet. Use the "Keyword Difficulty" feature on Moz Pro to research a specific keyword for each article. In the example case I used "involving children in our wedding". Honestly, I am not really sure what to do with this feature 🙂 I've read everything from "focus on the long tail" to "don't fear highly competitive keywords". So, my current thinking is merely to use it as interesting information for they keyword I choose but not actually make any specific decisions from that ie. make sure the keyword is relevant to the article as the first priority and use the tool to check out search volume. Not sure what I should read into a zero for recent Bing searches. Is that really an important factor? I'm assuming the Google information is not available from Google (it would be displayed here otherwise, I'm guessing) Use a title that uses these keywords. In this case, I simply went with "Involving children in our wedding". Same for URL - /wedding-guests/involving-children-in-our-wedding If I have a reasonable, short and human-friendly term like this (I can do this with virtually every article quite easily), is there any reason why the URL and the title should not be the same? In short, the title and URL are both a relatively concise "mini-sentence" Make sure the meta description of the article is easy-to-read (for humans) and uses the keyword (sentence) Make sure that the theme (we are moving to WordPress) uses H1 for the page header/title and H2 for sections within the document Implement 301 redirects from the old URL (old site) to the new URL This seems like a pretty obvious approach for articles where the URL has changed (which will be most of them). But what do I do with articles that I am going to remove. Should I redirect (301) to a related article (so at least the visitor ends up on a page that is generally relevant) or just let this "fall through" as a non-existent page (401)? As I say, I have 200+ articles to go through I want to make sure I am taking this advantage to clean things up. Anything leaping out as missing/problematic? Thanks in advance Mark
Intermediate & Advanced SEO | | MarkWill0 -
Site Structured Navigated by Cookies
Is it advisable to have a site structure that is navigated via URLs rather than cookies? In a website that has several location based pages - each with their own functions and information? Is this a SEO priority? Will it help to combat duplicate content? Any help would be greatly appreciated!
Intermediate & Advanced SEO | | J_Sinclair0 -
If I only Link to Page via Sitemap, can it still get indexed?
Hi there! I am creating a ton of content for specific geographies. Is it possible for these pages to get indexed if I only put them in my sitemap and don't link to them through my actual site (though the pages will be live). Thanks!
Intermediate & Advanced SEO | | Travis-W
Travis0 -
Menu & Sub menu structure - section specific sub menu?
Hi, At present I have a set of regions across the nav bar with drop downs for towns within these regions. This totals about 60 links. This set up is pretty much site wide and the site ranks well for many of these towns. However, this is quite a lot of links per page (without the page specific/content links) and I am wondering about having just a horizontal sub menu of towns appear below the nav bar only specific to the selected region. Do you think cutting down the number of menu links will be beneficial to the content page's ranking. Sorry if that isn't very clear, can't think of a better way of putting it. TIA,
Intermediate & Advanced SEO | | Cornwall
Chris0 -
Which URL structure is much better?
Hi Everybody, Which URL structure is much better? Type 01. http://www.domain.com/category-a/
Intermediate & Advanced SEO | | cprasad
http://www.domain.com/category-a/subcategory-a-1/
http://www.domain.com/category-a/subcategory-a-2/
http://www.domain.com/category-b/
http://www.domain.com/category-b/subcategory-b-1/
http://www.domain.com/category-b/subcategory-b-2/ Type 02. http://www.domain.com/category-a/
http://www.domain.com/subcategory-a-1/
http://www.domain.com/subcategory-a-2/
http://www.domain.com/category-b/
http://www.domain.com/subcategory-b-1/
http://www.domain.com/subcategory-b-2/ How these 2 types can affect for Ranking, Site Links in Google and passing PR from root to other pages? Thanks Prasad0 -
Is this structure valid for a canonical tag?
Working on a site, and noticed their canonical tags follow the structure: //www.domain.com/article They cited their reason for this as http://www.ietf.org/rfc/rfc3986.txt. Does anyone know if Google will recognize this as a valid canonical? Are there any issues with using this as a the canonical?
Intermediate & Advanced SEO | | nicole.healthline0