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 a canonical link
  • 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 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

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