hit counter joomla

How to Create A Sitemap.xml in Joomla 2.5

A Joomla Sitemap.xml file is no different than any other sitemap really. What a sitemap.xml file does is hold critial information about your Joomla website's URL structure and articles. It might contain short descriptions and image links as well. 

A Sitemap.xml file helps Search Engines Crawl your site.

The above description pretty much says it all, but how do you set up a sitemap.xml file in Joomla?

I just added one to one of my projects, and documented the process to share with all my Joomla User Group Detroit Friends!

Set Up a Joomla Sitemap Tutorial

First of all, I really recommend "XMap" by Guillermo Vargas. Xmap is a generator component for Joomla, and is available for J2.5 & J3.0. Xmap makes it easy for you to create a sitemap of your website using your menu(s) structure. Xmaps re-generates the sitemap automatically, so you don't have to keep going back to it to do updates. You can also visit the change frequency for each menu. Xmap on the Joomla Extension Directory

 


 

Setting up the Xmap Component

I'm going to make the wild assumption that you know how to install extensions in Joomla, so skipping to the good stuff, you first have to activate at least two plugins that were automatically installed with the component:

Go to Extensions > Plugins and type "xmap" in the filter to give you this list:

activate-xmap-plugins

Make sure you have both the content and weblinks plugins activated (green checks), and if you use any of the other mentioned extensions, activate those as well.

Next, you will want to go to Components > Xmap and click "New" to create your first sitemap.

xmaps-new-sitemap

You can name your sitemap anything you want, but your first one could be nothing more than "sitemap". Fill in the description if you want, make sure that the "status" is set to publish, then on the right, open the "menu" dropdown if it's not already open:

 xmap-menu-selector

Choose your main menu for your first sitemap, plus any other menus that are publically accessable that have content that you want the search engine spiders to crawl. In my case (using JoomlaDetroit.com as an example), I would choose "main menu" and "footer menu". Both have content that I want crawled. I then would change the frequency on the home menu to "daily" as I write blog content almost daily. If you only do updates once a week or less, leave it at "weekly" or even set it to "monthly".

A word about the "Priority" setting

The priority setting tells the search engine that certain pages are more important than others. This does not mean your pages are more important that pages on other websites, but rather, just your own site.


Looking for other Joomla Resources?
Don't waste your time searching for hours on the JED! Check out our trusted Joomla Resources page!

So next is the Xmap options tab

The only two things that you need change are the Compress XML and Beautify XML settings. These should be set to "no". Google errors out when trying to craw a beautified and compressed XML page, so just for safety's sake, set these to "No". Click Save & Close, and you're done creating your sitemap.

Go back to the "Sitemap Manager" page if you aren't taken there automatically. It can be found by clicking Components > Xmap. You will now see your new sitemap:

xmap-sitemap-manager

The next part is a little tricky... Open up your FTP client and connect to your site. In "public_html", "www" or "htdocs" folder (world accessable folder), you will have to change the .htaccess or htaccess.txt file.

At the bottom of the file, using your favorite text editor, add the following lines:

RewriteCond %{REQUEST_URI} ^/sitemap.xml
RewriteRule .* /URL-to-sitemap-here

 

The URL to the sitemap will be found next to the start in the image above. copy the link and paste into the text editor, stripping out the domain and beginning and ending slashes:

http://joomladetroit.com/index.php?option=com_xmap&view=xml&tmpl=component&id=1/

becomes

index.php?option=com_xmap&view=xml&tmpl=component&id=1

So the second line of the rewriteRule should look like this:

RewriteRule .* /index.php?option=com_xmap&view=xml&tmpl=component&id=1

Save the file and re-upload to the server.

You should now be able to access the sitemap by going in your browser to:

http://YOUR-DOMAIN.com/sitemap.xml

or, if that fails or you do not have access to the .htaccess/htaccess.txt,

http://your-domain.com/index.php?option=com_xmap&view=xml&tmpl=component&id=1

That's it! you are ready to have your website crawled, and best of all, the map automatically updates itself!

EXTRA CREDIT: Initiating a Site Crawl with Google Webmaster Tools

 Go to your site's webmaster tools account and from the left navigation, go to Optimization > sitemaps. There will be a little red box in the upper right that says "ADD/TEST SITEMAP". Click on the box, and add "sitemap.xml" or the long URL string and click test.It's always best to test the sitemap before you actually submit so you can verify that there's no errors with the map.

webmaster-tools

add-sitemap

If the test was a success, you should see something like this:

 

sitemap-complete

Now close this, and do the same thing, adding the sitemap button > enter sitemap's URL exactly the same as you did for the test, but this time, click the submit button and it send Google the sitemap for submission.

Initiate the Crawl

Now you will want to tell Google to Crawl your site. Since you installed the sitemap, things should be pretty worry-free. On the left navigation, go to Health > Fetch as Google.

You can only do a full site crawl 10 times, so be frugal (I used one up for this tutorial too)

fetch-as-google

For a full site crawl, don't enter anything in the box to the right of the domain name. Just click fetch. Fetching won't cost you anything. When you submit is when they dock you for a submission.

fetch-as-google-complete

Just click the "submit to index" button, and you're done. It's rather anti-climatic because you wont see any changes to your site, nor will you see anything happen on your Google ranking or search display for a while. It can take a couple days for changes to happen. Just be patient, though. You can sit back and rest assuredthat you did it correct.


Looking for other Joomla Resources?
Don't waste your time searching for hours on the JED! Check out our trusted Joomla Resources page!
 

 


People in this conversation

Load More

Leave your comments

Post comment as a guest

0 / 2500 Character restriction
Your text should be in between 10-2500 characters
terms and condition.

Around Joomla!

  • Joomla! to attend Merge / CMS Summit 2017

    Displaying items by tag: English Aug 1, 2017 | 05:09 am

    CMS Summit will bring together developers, integrators, designers, experts, and users with other Merge attendees ranging from start-ups, hosting companies, funding, digital media and legal experts to domain owners looking for advice and help with launching their site.  The conference will offer much more than sessions and training by creating a unique networking situation to drive business and commerce.

    Read more...
  • Joomla! On Community Leadership.

    Displaying items by tag: English Aug 1, 2017 | 05:07 am

    Jab17 was an opportunity for several of our newly-elected members of OSM's leadership to meet with the Joomlers who were attending the conference in Krakow, Poland, for a drink a chat and brainstorming. 

    Read more...
  • A chilly Joomla! Day in Arusha.

    Displaying items by tag: English Aug 1, 2017 | 02:49 am

     Welcome to Arusha, the town so calm, so beautiful, so welcoming. You should come here if you can afford it. Endless queues of tourist are arriving here in their numbers....You wonder why, but when you are here, everything makes sense, makes peace. Driving in Arusha I can see how a large, sprawling city with all of the contradictions that brings, it is, the best place to be. The traffic police standing on the street in their white uniform, very white my friend asked how they wash it, they keep it white, just like new.  

    Read more...
  • How to implement Google Tag Manager Environments with Joomla templates

    Displaying items by tag: English Jul 31, 2017 | 23:02 pm

    A problem we have faced in our Joomla development work has been ensuring that the correct Google Tag Manager environment code is being deployed with the right environments - for example in our development environments we need to deploy the container code from GTM related to the dev environment, but in production, we need the live container code.

    Read more...
  • Joomla Docs Team Leader: Sandra Thevenet

    Displaying items by tag: English Jul 31, 2017 | 05:57 am

    In this issue, Sandra Thevenet takes us on a quick tour of the Joomla! Documentation website.  She oversees and contributes to the creation, edition of the documents, as well as their translations into several different languages. If you have a question about Joomla, this is the first place you must go to.

    Read more...
 

Posted By:
Joomla User Group Detroit

Organizer,

Donations and Gifts

Donations that go to keeping the Meetup 100% Free are welcome!