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.

SEO action type

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

Insert or alter metadata tags

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 meta tag
  • canonical link

Page title

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.

Description meta tag

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

Contrary to the page title, it's 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 be used by search engines to display a snippet for your page in search results. As such, you want to write a good description that will attract clicks from searchers.

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

How to specify description meta tag modifications

Description meta is rarely used by search engines

In most cases, Google will not use the description meta tag to display a snippet for your page in search results. Instead, it will build its own snippet based on the content of the page. Studies have shown that your description will only be used at best 30% of the time. Keep that in mind if you plan on spending a lot of time writing descriptions.

Robots meta tag

The Robots meta tags (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 to index parts of your website. For instance, you may want to avoid all your user account pages, or some duplicates or old pages to be 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 pags 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 page

Also available for specific use, the NO index - Follow should generally be avoided. It's supposed to tell search engines not to index a page, but to follow links on this page, to other pages. However, at least Google treats this tag the same as NO index - NO Follow, if it's found for a long enough time (of course they don't say how long such a time would be).

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 you custom value there.

How to specify  a custom robots meta tag value

Insert canonical

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

Use custom fields to set the canonical target

The Canonical URL to use field lets you use a Joomla custom field instead of a hard-coded canonical URL. You can take advantage of custom fields to provide custom value per article or item, instead of having to create more rules.

Sitemap exclusion or inclusion

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

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

Exclude from sitemap

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

Exclude older than

Exclude 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.

4SEO can obtain the creation or modification date of a piece of Joomla native content but this maybe not other types of content. If that happens, the rule will just be ignored.

Exclude archived

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

An archived status exists for Joomla articles or categories but may not exist for other types of content. If that happens, the rule will just be ignored.

Block access

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 to crawl and index 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

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 to inject on your choice of pages:

  • custom CSS
  • custom javascript
  • custom json
  • custom HTML

You use 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 do 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 top 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