Blue Flower

How To Quickly Add Sitemap To Your Joomla 3.4 and higher Site

Unfortunately, for whatever reason, a fresh install of Joomla does not start off with a default sitemap or automatically generate a sitemap.xml or sitemap.html files.  This article will show you how to get that quickly and associate it with the standard links search engines look for. 

Let me know if you need instructions for adding sitemap for Joomla 2.5 to 3.3.x.

Please know that I do not get paid to write these articles.  This article took at least a good 6 hours to make.

Steps

(Part 1)

  1. Go to mapX download page at Z-Index, here.

  2. Scroll down and click on Download button, and save the file, and remember or make note of where the .zip file got downloaded to.

  3. Login to your site's Joomla backend control panel.

    Joomla Backend Login

  4. From top Extensions menu select Extension Manager.

    Select Extensions Manager from Extension menu at top

  5. Begin installation of the new extension: Under where it says “Upload & Install Joomla Extension”, click the Browse button with your mouse’s left button, and locate the .zip file you downloaded earlier.  Select the .zip file on your computer and click on Open/Ok.
    Joomla Extention Upload and Install

  6. Complete new extension installation. Next, click on Upload & Install button to have it uploaded to your hosting server (your joomla file system) and installed.

  7. Once installed, you will see a green bar or message indicate installation is successful. The message will say something like, “Installing package was successful”, or "Installed package was successful". 
    Installing package was successful message

  8. From Components menu at top select mapX (newly added).



  9. Click on the green New button near top left corner.



  10. Type the reference name of the sitemap, since you can have multiple sitemaps.  We will be just having one main sitemap, and it will be based on the Main Menu items. 



  11. Check the box for the Main Menu or, if you prefer, a custom menu of your own, and then select the "Save & Close" button above.

  12. You will now see a newly listed Sitemap selection (named Main Sitemap or whatever name you gave it earlier) with the buttons of HTML, XML, News, and Images to the right of it.  Clicking with the left mouse button on either XML, or HTML will allow you to see your site's sitemap, based on the Main Menu items, in XML format and in HTML format, respectively.






(Part 2)

Have mapX made URL be seen when visitor or search engines go to sitemap.xml.

Now to have the URL for the dynamically generated XML file be gotten to when anyone goes to sitemap.xml at your site.  I will show two methods.  First method will be using Web Hosting With $1's hosting control panel, cpanel, to easily make this happen.   Second method will be to manually modify the .htaccess file to make it happen.

First Method

  1. Login to your cpanel.

    Cpanel login

  2. Go to the Domains section and select Redirects

    cpanel domains redirect

  3. Configure the Redirect.  Type sitemap.xml in the first field.

    Setup Redirect

  4. Copy the XML URL (web address) you got from clicking on the XML button from the Part 1 step above.

  5. In the "redirects to" field, paste the copied URL, which should be ending with "index.php?option=com_xmap&view=xml&id=1" or similar.

  6. Set the Type to Permanent (301) and select "Redirect with or without www", and click on Add button.

  7. Check sitemap.xml URL.  Now, if you go to your Joomla website, and put sitemap.xml at the end of it (it would look like this, http://www.Your-Site.tld/sitemap.xml), or simply click on the sitemap.xml listed redirect, it should show your sitemap in XML format by redirecting your browser traffic to the URL that ends with "index.php?option=com_xmap&view=xml&id=1".



Second Method

  1. Make backup copy of .htaccess file.  Use a FTP software or other interface like cpanel File Manager and make a copy of the .htaccess file as a form of backup.

  2. Edit the .htaccess file and add the following lines to it:

    RewriteCond %{HTTP_HOST} ^your-domain\.tld$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.your-domain\.tld$
    RewriteRule ^sitemap\.xml$ "http\:\/\/www\.your-domain\.tld\/index\.php\?option\=com_xmap\&view\=xml\&id\=1" [R=301,L]


    You would replace the "your-domain\.tld" with your own Domain and Top Level Domain.  Make sure you pay attention to the format shown.  For example, for Tech Notes site, the "your-domain\.tld" would become "tn\.whw1\.com".  Adding this to the .htaccess doess the same thing the Redirect feature does from cpanel.

  3. Check sitemap.xml URL.  Now, if you go to your Joomla website, and put sitemap.xml at the end of it (it would look like this, http://www.Your-Site.tld/sitemap.xml), it should show your sitemap in XML format by redirecting your browser traffic to the URL that ends with "index.php?option=com_xmap&view=xml&id=1".

 

(Part 3)

Have sitemap location identified for all search engines and robots to pickup.

  1. Make backup copy of robots.txt file.  Use a FTP software or other interface like cpanel File Manager and make a copy of the robots.txt file as a form of backup.

  2. Edit the robots.txt file and add the following line to the bottom of that file:

    Sitemap: http://www.Your-Site.tld/sitemap.xml

    You would replace the "Your-Site.tld" with your own Domain and Top Level Domain

Feel Free To Leave A Good Comment. :)

Look around, and you may find other useful articles. Add this site to your Bookmarks/Favorites for easy return for new articles. Consider submitting technical articles for publication, including your embedded links. I will even create a new category if needed.