Home > Magento Extensions > New Magento Extension: Dynamic Sitemap

New Magento Extension: Dynamic Sitemap

Posted on: 11th Oct 2011 By: Robert Kent 40 Comments

Myself and my colleague Tom F here at E-commerce Web Design have come up with a new extension for you – for Free!

This extension is easily installed and once installed enabled an automatic self-generating HTML sitemap. This sitemap is dynamic and lists all of your categories and main CMS pages.

Heres a little look of what it will produce (bear in mind this is default theme with some strange categories):


It will appear of Magento Commerce shortly so stay tuned for the link!

…and here is the link! http://www.magentocommerce.com/magento-connect/creare-dynamic-sitemap-seo.html

Or you can download it here. We’ve tested on 1.5 and 1.6 but it may work on others just as easily (let us know if it does/doesn’t)!

Once installed you can view your sitemap by going to www.yourmagentosite.com/sitemap

If you have any questions about this extension or any thoughts on how we can extend it then please let us know!

Thanks for visiting the Magento Blog here at E-commerce Web Design – home of the Magento Fox!

40 Responses to “ New Magento Extension: Dynamic Sitemap ”

  1. Pau
    #1 | 12th October 2011

    Thanks for sharing this! I hope this solve my problems when trying to generat a sitemap.xml file. The problem I had was that even though the sitemap.xml file was generated and placed on the magento root directory, it was no accessible (Magento throw a 404 page when trying to access to this sitemap…).

    Thanks again for this!

  2. Nick
    #2 | 13th October 2011

    I got this error, the site is running magento 1.5.0.1

    Access forbidden!

    You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected.
    Error 403

  3. Robert Kent
    #3 | 14th October 2011

    Hi Nick,

    Is your local folder etc writable? It might be that the controller has not copied across correctly.

  4. Benjamin
    #4 | 26th October 2011

    We are looking for an extension to help us with our sitemap issue.

    We have a large Magento store with 400,000 products and obviously the sitemap limit is 50,000.

    We’ve tried other extensions to help us split them down and have an index file.

    Any ideas?

  5. Thurston217
    #5 | 28th October 2011

    Awesome post/extension! Worked well with our site. Functions but doesn’t look too “pretty”. Any ideas? http://www.honestoffice.com/sitemap/

    Would like to make 3 columns but not sure how to do it dynamically. Any input would be greatly appreciated. Thanks!

  6. Ryan
    #6 | 25th November 2011

    Hi
    I just get a blank page when trying to access
    http://www.mxwholesale.co.uk/sitemap

    am i missing something

  7. Robert Kent
    #7 | 25th November 2011

    Hi Ryan,

    It could be a permissions issue – did you use the download from Magento connect or the files from this site? If it was the files perhaps the permissions need setting?

  8. Ryan
    #8 | 25th November 2011

    Hi, thanks for your fast response i used the download from connect.

  9. Thurston217
    #9 | 30th November 2011

    Any response to my previous post about it not making columns for my sitemap page? Thanks.

  10. Robert Kent
    #10 | 30th November 2011

    Hi thurston,

    It looks like the CSS file was not copied across – could you try adding the css file? Or you could add the following to your own css file:

    .sitempan { width: 100%; float: left; }
    .smh2 { font-size: 1.4em; padding: 10px; display: block; }
    .strongsm { font-size: 1.4em; display: block; }
    .siteul { margin: 5px; padding: 0 0 0 10px; float: left; width: 45%; }
    .siteul li { list-style:inside; font-size:1em!important; }
    .sitecatul { margin: 0 5px; padding: 0 0 0 10px; float: left; width: 100%; }
    .sitecatul li.cat { list-style:none; font-size:1em!important; display: block; float: left; width: 45%; margin: 0 0 10px 0; }
    .sitecatul li.cat ul { margin: 0 5px; padding: 0 0 0 10px; }
    .sitecatul li.cat ul li { list-style:inside; }
    .two-column { width: 50%; float: left; display: block; }

  11. Thurston217
    #11 | 30th November 2011

    Much better! Thanks Robert for the prompt reply. Any idea why the “Technology” category is not moved vertically like the categories in the right-hand column?

  12. Robert Kent
    #12 | 30th November 2011

    Hi thurston,

    Yes unfortuantely that’s because of the CSS syling – to get them all to slot together nicely would require a bit more CSS – there is a javascript plugin out there that allows you to do this. I believe it’s called jquery masonry. As the css in ours are blocks they unfortunately retain their heights and cause some to float left and others not to.

  13. Ryan
    #13 | 30th November 2011

    what about the reason mine doesn’t display?

  14. Robert Kent
    #14 | 30th November 2011

    Hi Ryan,

    Looking at your site it seems that the controller has been successfully loaded but the block is not being added – please check that the xml file is being loaded correctly and the phtml is in the correct theme for your project

  15. Chaber
    #15 | 20th January 2012

    Works great but only appears the cms pages the categories but not the products.

    Can somebody help me?

  16. Gloria
    #16 | 2nd February 2012

    I also get a blank page on install. I notice that the script installs with 666 permissions which is not allowed with phpsuexec. I tried setting it to 644 but no dice … still blank.

  17. Gloria
    #17 | 5th February 2012

    I would sure love to get this working. However, all I get is a blank page. What permissions does this script need? I followed this topic |
    http://www.magentocommerce.com/wiki/groups/227/resetting_file_permissions
    | and made sure that ALL files and folders were set properly and still NOTHING!!!! What a shame.

  18. Gloria
    #18 | 24th February 2012

    For those getting a blank page while using anything other than the default Magento theme ….

    You need copy file of extension from folder “app/design/frontend/default/default/layout” and “app/design/frontend/default/default/template” to folder “app/design/frontend/yourtheme/default/layout” and “app/design/frontend/yourtheme/default/template”.

  19. Ryan
    #19 | 28th February 2012

    Just installed this yesterday and it’s working great. Thanks! However, I need to provide links to my sitemap.xml page to Google and Bing. I can access the dynamic sitemap at http://www.mysite.com/sitemap, but where do I point the search engines to, for the acutal sitemap XML file? Thanks again!

  20. Gloria
    #20 | 28th February 2012

    @Ryan … I would think that you’d want to point search engines to your actual sitemap.xml file. Which if your created it in Magento accepting the defaults would be http://mystore.com/sitemap.xml

    You may want to reference this post : http://www.magentocommerce.com/wiki/3_-_store_setup_and_management/seo/creating_google_sitemaps_for_magento_sites

  21. Ryan
    #21 | 2nd March 2012

    Thanks Gloria,

    I finally figured it out. I just assumed that this extension replaced the actual sitemap file, or created one if one didn’t already exist. Here’s my working page: http://www.theearthquakekit.com/sitemap

    Didn’t realize that this was a completely separate thing from the actual sitemap.xml file. Maybe it’s just me, or maybe it’s worth noting in the documentation. Either way, thanks for the great extension!

    Ryan

  22. Jan Anne
    #22 | 5th March 2012

    I installed the module and got a blank page,
    changed the permissions of all files,
    copied the files to my template
    and cleared the cache.

    I’m still having a blank page, see: http :// bestelvloerkleed . nl / sitemap .

    Robert, what am i doing wrong?

  23. Magento Developer
    #23 | 11th March 2012

    Hi, Thank you for this free extension, but can you check the NAME of the extension in Magento Connect page, its Creare Dynamic Sitemap (SEO), note: Creare, is that create or creare.

  24. cheap books stores
    #24 | 13th March 2012

    I need to change the CMS to apply for my new stores. Who have the idea? Is Magento complicated?

  25. naveenos
    #25 | 14th March 2012

    Hi Jan Anne,

    There may be two reasons:
    First you should clear the cache and then refresh the sitemap page. you will get result on the page.

    Still you are getting blank page then you should check your design folder. May be you are working on your own theme design folder.
    when you install this extension from magento connect that time it installed in default theme so you should move both layout and template files to your theme folder.

    That’s it.

    May be it will helpful for you.

    Thanks & Regards,
    Naveen Kumar Jain

  26. Oscar
    #26 | 22nd March 2012

    I too was getting a blank page. Now it’s working thanks to this blog. As Gloria suggested I relocated the the folder and file and it works. However, I am receiving two discrepancies.

    1. My sites layout is 2 columns with left bar. And the sitemap page displays in 1 Column.

    2. The sitemap page is including both a “sitemap” link and a “Sitemap.xml” Link. The “sitemap” link works, but the “Sitemap.xml” link doesn’t. How can I remove the Sitemap.xml reference?

    Also, are there any suggestions on how to change the layout of the links? I’d like to learn how to adjust the links from all listing in one column to two columns. Any help is very much appreciated.

    Here is my working page:

    http://www.3rdrockhobbies.com/index.php/sitemap
  27. Oscar
    #27 | 22nd March 2012

    I’ve come to realize my layout issue is an issue with styling. Would this be a an issue with the .css file? If so, where would I find it and what should I do with it?

    Thanks

  28. Oscar
    #28 | 22nd March 2012

    Did some searching and I found the file. So, the answer to my question is yes.

    As Gloria mentioned earlier:
    “You need copy file of extension from folder “app/design/frontend/default/default/layout” and “app/design/frontend/default/default/template” to folder “app/design/frontend/yourtheme/default/layout” and “app/design/frontend/yourtheme/default/template”.”
    –This will correct your blank page.

    As Robert mentioned,
    You also need to move the .css file located in the Magentos default theme folder to your custom theme folder. This will correct the layout.

    Here is the look of it:http://www.3rdrockhobbies.com/index.php/sitemap/

    Now if I could only get the XML Sitemap link corrected…

    Thanks for the help guys.

  29. Oscar
    #29 | 23rd March 2012

    How can I manage to get the sitemap to appear in the 2column with left bar layout?

    Thanks

  30. Oscar
    #30 | 23rd March 2012

    The “XML Sitemap” link on my sitemap page is pointing here: “/index.php/sitemap.xml”.

    However, my “sitemap.xml” file is located here: “/sitemap.xml” on the root. Can someone tell me how to correct this?

  31. Oscar
    #31 | 28th March 2012

    Any Suggestions?

  32. Robert Kent
    #32 | 28th March 2012

    Hi Oscar,

    To get the XML sitemap into the 2-columns left layout you should be able to edit the layout XML file (app/design/frontend/default/default/layout/dynamicsitemap.xml).

    To

    As for the index.php being part of your base url – have you turned your rewrite urls on in System>Config>Web>Search Engines Optimisation? that should remove the index.php

  33. Oscar
    #33 | 28th March 2012

    Hi Robert,

    Thanks for the response.
    I made the modification as suggested in the “dynamicsitemap.xml” file. However, there was no change. The page remained in the 1column layout. I made the mod in my theme location of the file, and when it didn’t work, I tried the default location of the file. None executed a change.

    As for the “index.php” issue. When I enabled Search Engines Optimization:
    Use Web Server Rewrites – YES. I received the 404 not found error message when navigating my site.

    Any other suggestions?

  34. Oscar
    #34 | 28th March 2012

    My mistake, I forgot to clear the cache. Sitemap is now in 2colums-left layout. Thank you.

    However, The index.php base url issue still remains.

  35. Robert Kent
    #35 | 28th March 2012

    Hi Oscar,

    Perhaps as a quick fix load up your sitemap.phtml file and replace line 9 with:

    <li><a href="<?php echo str_replace("index.php/","",Mage::getBaseUrl()).$sitemapfilename; ?>" title="XML Sitemap">XML Sitemap</a></li>

    so thats…

    echo str_replace(“index.php/”,”",Mage::getBaseUrl()).$sitemapfilename;

  36. Oscar
    #36 | 28th March 2012

    Thank you sir,
    Your a genius. :)

    I’ve also noticed that the sitemap is generating duplicate Homepage links as well as the Contact Us link. My Homepage has a long Title and it seems too long for the sitemap page. Is there a way to have it list:
    “Home” (as line 13 states)
    as apposed to:
    “3rdRockHobbies – Radio Control Airplanes, Cars, Boats, Helicopters, Parts & More”,
    and then hide lines 13 and 14?

  37. Robert Kent
    #37 | 29th March 2012

    Hi Oscar,

    I think for what you are after you can delete lines 13 and 14 like you say and then visit the following file:

    app>code>local>creare>dynamicsitemap>block>dynamicsitemap.php

    Then on line 13 you will see that I’m placing the home link in the html variable. What you can probably do is change the line from

    $html .= "<li><a href=\"$url\" title=\"".$page['title']."\">".$page['title']."</a></li>\n"; // this is for a nice local link to home

    To:

    $html .= "<li><a href=\"$url\" title=\"".$page['title']."\">Home</a></li>\n"; // this is just a link to home

    This should do the job!

  38. Oscar
    #38 | 29th March 2012

    Worked like a charm, Thank you very much.

  39. Janzl
    #39 | 5th April 2012

    Hi I keep on getting a 404 error when I enter my sitemap link.

    http://www.lilshop.nl/webshop/sitemap

    Could I be doing anything wrong?

  40. Gloria
    #40 | 15th April 2012

    Hey Guys,

    I need a little help with styling. I have one category that generates a really long list, thus creating a lot of space between the first and second category rows. I’d like to even out output so that the presentation is more professional looking. Examine the output at http://readyforpleasure.com/sitemap

    Any assistance would be greatly appreciated.

Post A Comment

Your comments:
Enclose code snippets within the appropriate tags: [php][/php]   [js][/js]   [xml][/xml]   [css][/css]   [html][/html]
E.g: [php]<?php echo "hello world"; ?>[/php]

Search Blog

Archives

For the record...

Views & opinions in this blog are those of the individual and do not necessarily reflect those of E-commerce Web Design or the Creare Group.