To complete on-site search engine optimisation adequately on a Joomla website, the following items need to be set up:
- search engine friendly urls
- a global meta description
- a suitable robots.txt file
- a unique page title for each page
- a unique H1 heading for each page
- a unique meta description for each page
- a sitemap submitted to Google Search Console
Fortunately, Joomla can do all of the essential steps (1 to 6 below) out of the box without the need for any third party extensions.
1. Search Engine Friendly URLs
Using the File Manager in cPanel or an FTP client or similar, rename the htaccess.txt
file in the root folder of the website to .htaccess
.
Log in to the back-end of the Joomla website with an administrator account and go to System → Global Configuration → Site.
Configure the SEO Settings as follows:
- Search Engine Friendly URLs = Yes
- Use URL Rewriting = Yes
- Add Suffix to URL = No
- Unicode Aliases = No (usually)
- Site Name in Page Titles = No
2. Global Meta Description
Log in to the back-end of the Joomla website with an administrator account and go to System → Global Configuration → Site.
Add a Site Meta Description.
The Site Meta Description is included on pages where no meta description is found for the article, category or menu item.
I don't usually worry about Meta Keywords any more as these are ignored by Google.
3. robots.txt
The default robots.txt
file in Joomla does not allow access for search engines to all the required CSS and JavaScript files. Google (for example) needs access to CSS and JavaScript files to check whether the website works well responsively or not.
I recommend the following customised robots.txt file for Joomla 3.x websites:
User-agent: *
Disallow: /administrator/
Disallow: /bin/
Disallow: /cache/
Disallow: /cli/
Allow: /components/*.css
Allow: /components/*.js
Disallow: /components/
Allow: /includes/*.css
Allow: /includes/*.js
Disallow: /includes/
Disallow: /installation/
Disallow: /language/
Allow: /layouts/*.css
Allow: /layouts/*.js
Disallow: /layouts/
Allow: /libraries/*.css
Allow: /libraries/*.js
Disallow: /libraries/
Disallow: /logs/
Allow: /modules/*.css
Allow: /modules/*.js
Disallow: /modules/
Allow: /plugins/*.css
Allow: /plugins/*.js
Disallow: /plugins/
Disallow: /tmp/
The robots.txt
file is located in the root folder of the website and can be updated via the File Manager in cPanel or an FTP client or similar.
4. Page Titles
Enter a unique page title for each page.
The best practice for page titles is human readable text, up to around 65 characters, on one line, including keywords, branding and localisation with the main keywords first unless the brand is recognisable and in this case the brand should go first.
I tend to enter page titles in the menu option as H1 Headings and Meta Descriptions can also be entered here at the same time.
5. H1 Headings
Enter a unique H1 Heading for each page. There should be exactly one H1 Heading on each page and this can be supplemented with H2 and H3 headings if needed.
The best practice for H1 Headings is human readable text, 20 to 70 characters, on one line at the start of the article before any H2 or H3 etc headings and with the main keywords first.
I tend to enter H1 Headings in the menu option as Page Titles and Meta Descriptions can also be entered here at the same time. I am assuming that the Joomla Template displays the page heading as a H1 heading but this is template dependent and not always the case.
Note that blog articles don't necessarily have their own menu option and in this case, the H1 Heading can be enabled in the article.
6. Meta Descriptions
Enter a unique Meta Description for each page.
The best practice for Meta Descriptions is human readable text, 155 to 160 characters, on one line including keywords, branding and localisation and with the main keywords first.
I tend to enter Meta Descriptions in the menu option as Page Titles and H1 Headings can also be entered here at the same time.
Note that blog articles don't necessarily have their own menu option and in this case, the Meta Description can be entered in the article.
I don't usually worry about Meta Keywords any more as these are ignored by Google.
7. SiteMap and Google Search Console
Ideally, a Sitemap should be created and submitted to Google Search Console (Webmaster Tools).
This makes it easier for Google to crawl your website and to make sure that all pages are being crawled and indexed.
Google also then has a way to notify you about any problems with the website such as crawl errors.
Creating a Google Search Console account is free and easy to do.