SEO basics
This page is for developers who build sites that search engines must understand. Most of it is not tricks but structure: stable addresses, one canonical address per piece of content, a real title and description per page, a sitemap and redirects when things move. Exponential provides the parts; your templates and settings put them together.
Contents
- Addresses
- One canonical address
- Titles and descriptions
- Metadata from content: xrowmetadata
- Sitemaps and robots.txt
- Redirects
- Language versions
- Speed and markup
- Checklist
Addresses
Every node gets a readable address from its path in the tree (/news/opening-of-the-new-hall), lower case and with
dashes as configured in site.ini [URLTranslator]. A tree designed like the site's navigation gives addresses that
explain themselves; avoid deep folder chains that exist only for editors
(URL aliases and routing, Designing a content model).
Keep view parameters (/(offset)/10) to paging and known filters.
One canonical address
An object with several locations has several addresses. Print a canonical link to the main node in the pagelayout or full view:
<link rel="canonical" href=$node.object.main_node.url_alias|ezurl( 'double', 'full' )>$module_result.content_info.main_node_url_alias has the same in the pagelayout
(Objects, nodes and locations).
Titles and descriptions
- The
<title>is built in the pagelayout, usually from the path of the module result (the node's name and the site name) (Module result and content info). site.ini [SiteSettings] MetaDataArray[]holds the site-wide defaults (description,keywords,author,copyright); replace the shipped values in your siteaccess settings.- Per-page descriptions come from content: an intro field or a metadata attribute, printed washed in the pagelayout.
Metadata from content: xrowmetadata
The xrowmetadata extension of the default distribution adds an xrowmetadata datatype (title, keywords,
description) that editors fill per object, and generates XML sitemaps. Add the attribute to the classes that have
pages of their own and print it in the pagelayout, falling back to the name and intro when it is empty
(Mapping content: search engine metadata).
Sitemaps and robots.txt
- Sitemaps:
bcgooglesitemaps, part of the default distribution, generates XML sitemaps through its cronjob parts;xrowmetadatacan generate them too. Use one of them, not both. - robots.txt: a new installation ships one at the web root with sensible rules; add your
Disallow:lines and your sitemap address (A useful robots.txt out of the box).
Redirects
Renamed and moved content keeps its old addresses as history entries that still lead to it. For addresses of an old
site, add custom URL aliases with redirect or URL wildcards (old-blog/* to news/{1}) before launch, and watch the
404 list after it (Links, URL aliases and wildcards,
Migration checklist).
Language versions
Each language has its own addresses of the same node. Link the versions of a page to each other: [RegionalSettings] TranslationSA[] names the translation siteaccesses, and the language_switcher operator with switchlanguage/to builds
the links; hreflang alternates are written by your pagelayout from the same data
(Translations and languages).
Speed and markup
Fast pages and clean markup help both visitors and search engines: semantic headings, landmarks, images with alternative text, width and height (Performance, Accessibility). Structured data (JSON-LD) is written by your templates; keep it in a template file of your design so it follows the content.
Checklist
- To do: Addresses read well; no test or "copy of" pages left in the tree.
- To do: A canonical link on every page with content in several places.
- To do: Titles and descriptions per page; the shipped
MetaDataArrayvalues replaced. - To do: A sitemap generated on a schedule and named in
robots.txt. - To do: Redirects for every old address that had traffic or links.
- To do: Language versions linked to each other.
Related pages
- Project launch checklist
- URL operators
- The pagelayout
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.