Skip to content

SEO rules management

4SEO lets you set up a number of rules to perform various actions on a defined group of pages.

As with all other types of rules used in 4SEO, you can target with a rule anywhere from one single page to your entire website.

Currently, the following rules can be created:

  • Insert or alter metadata tags
  • Exclude from sitemap
  • Block some requests, triggering a 404, a 403 or just putting that page offline
  • Insert raw code: any code, in head or body of the page

A metadata rule lets you insert or alter metadata tags on a group of pages. These can be the:

  • page title tag
  • description meta tag
  • Robots tag
  • canonical link

The page title is still an important tag for SEO. It helps search engines understand what the page is about, and is also used as the title of the page in the browser tab when viewing a page on your site.

Importantly, it’s commonly used on search engines results pages as the title of a snippet showing your website page. As such, it can help attract clicks from searchers, even though search engines may also frequently modify the title you created and build one themselves.

How to specify page title modifications

You can specify how the page title will be built for the pages targeted by the rule. The normal page title, as generated by Joomla, is represented with the {page_title} placeholder. You can add text before and after the page title, or replace it entirely.

For instance:

{page_title} - My website

will cause the page title to be displayed as My page title - My website.

Interestingly, you can also use other standard placeholders in the page title, such as:

{page_title} - {4seo_site_name}

also resulting in My page title - My website, or:

{page_title} - {4seo_year} - {4seo_site_name}

will cause the page title to be displayed as Our web conference - 2023 - My website.

There are many placeholders to use, including some coming from your e-commerce extension such as a product price or SKU.

Find the full list of placeholders in the replacer documentation.

The description meta tag is a short text that summarizes the content of the page.

Contrary to the page title, it is not used at all for ranking pages and deciding whether your page is worthy of being a result for a given search query.

But - like the page title - your description can also sometimes be used by search engines to display a snippet for your page in search results. As such, if you decide to write a description, you want to write something that will attract clicks from searchers.

As described above, it may be better sometimes to remove the meta description entirely. If you enable this option:

  • meta description tag is removed from all pages where the rule applies
  • OpenGraph / TwitterCards and Structured data output is not affected, they still use the page description
  • if you manually enter a custom meta description for a given page (on the Pages page), your custom description is still output as a meta description tag

Building up the description meta tag works in the exact same way as the page title:

How to specify description meta tag modifications

When sharing pages of your site over social networks, picking the right image is paramount to getting clicks. 4SEO will try to pick the best image automatically, and you can also manually select another image on a page-by-page basis.

But sometimes, particularly for pages from 3rd-party extensions, the automatic selection does not work well and it can be very tedious to manually select an image for many pages.

In such cases, you can force 4SEO to use your Default sharing image on all pages to which the rule applies. Simply select Yes for Force default image.

How to force the use of default image when sharing pages

This of course requires that you also select a default sharing image under Configuration | Social networks.

The Robots meta tag (mostly) lets you tell search engines whether they should index your website, and follow links they find in your pages to discover more content.

How to specify robots meta tag modifications

The main use of this tag is to actually prevent search engines from indexing parts of your website. For instance, you may want to avoid all your user account pages, or some duplicates or old pages being indexed.

You can set this robots meta tag in multiple places in Joomla already, but a metadata rule allows for setting it conveniently on a group of pages at once.

An example of “noindexing” a group of pages is to prevent Google from indexing your Tags pages. Tags pages are often useful for users to discover content, but are also often just duplicates of other more important pages. So it’s common to entirely exclude them from search engines.

You can do that easily with a metadata rule where you:

  • select the Tags component on the When to run tab
  • select NO index - NO Follow on the What to Do tab

For specific use cases, you can also manually enter a totally custom value for the robots meta tag. This is useful if you want to use the noarchive tag, for instance.

Click on the Enter value option in the Robots tag selector and a new input field will be displayed. Enter your custom value there.

How to specify  a custom robots meta tag value

A canonical URL is a very important tool in the SEO toolbox. It’s used to tell search engines that the current page does exist but its exact content should not be used and ranked directly. Instead, the content of another page - the canonical page - should be considered.

Likewise, all ranking signals such as links to the page should be passed and assigned to the canonical page instead of the current page.

Setting up a canonical is very similar to adding a redirect.

  • create a rule with the New button from the toolbar
  • Select on which pages the rule should apply: these will be the pages we add a canonical to
  • Enter a canonical specification: these will be the canonical pages themselves

A Sitemap rule lets you modify whether a page, or a group of pages, is excluded from the sitemap.

In a Sitemap rule, you can exclude or include pages from the sitemap in 3 ways:

Exclude from sitemap overrides any other option if enabled, and excludes the page or pages in all cases.

Exclude if older than lets you enter a number of days. If a piece of content has not been created or modified more recently than this number of days, it will be excluded from the sitemap.

Exclude archived lets you exclude content that has been marked as Archived.

Blocking access to some parts of your site can be useful under some circumstances. The two most common ones are:

  • block bad requests, usually with a 404 or 403 response code
  • temporarily block access to a part of a site while you’re working on it

The second case is the more useful SEO-wise: when making changes to some part of the site (the shop, the knowledge base, the FAQ,…), the content may be - temporarily - in bad shape with wrong or partial content, missing or incorrect images.

To prevent search engines from crawling and indexing this uncompleted content, best practice is to return a 503 response code for all the pages involved. This code tells search engines work is in progress, and they should come back later.

Joomla already lets you do that, with its offline mode, but you can only put your entire site offline. Not the most convenient if you only want to work on some parts of the site.

In such situation, 4SEO can help if you add a Site is offline rule for the corresponding part of the site.

Here is an example where we put offline only the /shop/ section of the site:

Selecting only the shop for putting it offline

Selecting Offline actions for the shop

Raw content rules are the ultimate SEO tool for usually more advanced actions on your website. In short, 4SEO lets you add any custom code to any page you like on your site, without having to do any coding (template overrides anyone???).

You can use it to inject on your choice of pages:

  • custom CSS
  • custom JavaScript
  • custom JSON
  • custom HTML

You use it by setting up rules as usual, in which you first decide on which page(s) the raw content should be injected.

Then on the What to do tab of the rule wizard, you enter the custom code you want to insert. You have a choice of 4 target locations for injecting it:

  • at the top of the <head> section
  • at the bottom of the <head> section (just before the closing </head> tag)
  • at the top of the <body> section
  • at the bottom of the <body> section (just before the closing </body> tag)

Here is an example where we insert Google AdSense code, but only on the /blog/ section of our site. Note that as recommended by AdSense, we put their code right at the top of the <head> section:

Selecting only the blog pages to inject adsense

Inserting adsense code into previously selected blog pages