Search by

drupal / mutamad_seo

Drupal-Infrastructure

Search and sharing for Mutamad: readable page addresses in Arabic and English, redirects when an address changes, meta tags and link previews, schema.org GovernmentOrganization, search-engine verification and an XML sitemap per language, with each translation linked to the others. Aligned to the DGA

Package info

git.drupalcode.org/project/mutamad_seo.git

Homepage

Issues

Type:drupal-recipe

pkg:composer/drupal/mutamad_seo

Statistics

Installs: 69

Dependents: 2

Suggesters: 0

1.0.x-dev 2026-11-15 08:39 UTC

This package is not auto-updated.

Last update: 2026-11-16 05:56:46 UTC


README

Mutamad SEO — تحسين الظهور

Mutamad SEO

Search and sharing for Mutamad: readable page addresses in Arabic and English, redirects when an address changes, meta tags and link previews, schema.org structured data describing the site as a government organization, search-engine verification and an XML sitemap per language. Aligned to the DGA Digital Government Standards.

Built and maintained by iSpectra.

What it sets up

FeatureWhat
Page addressesMade from the page's menu position and title (Pathauto), keeping Arabic letters: "خدمات المواطنين" becomes /خدمات-المواطنين, not /khdmat-almwatnyn. An English translation gets an English address from its own title
RedirectsWhen an address changes, the old one answers with a permanent (301) redirect to the new one, automatically, so links already given to citizens keep working (Redirect)
Missing pagesAddresses people asked for and did not find are listed for the site administrator to redirect, and still reach the site log — and the SIEM
Meta tagsTitle "page | site name", description from the summary, canonical address, and <meta name="generator" content="Mutamad"> on every page (Metatag)
Link previewsOpen Graph and Twitter Cards: site name, title, description and address when a page is shared on WhatsApp, Telegram, LinkedIn or X
Canvas pagesThe home page and the other pages built in Canvas keep their own title, description, address and image (Canvas's "SEO settings"); this adds the description and image to link previews, the date the page changed, and the page as a WebPage
schema.orgThe front page describes the site as a GovernmentOrganization and a WebSite it publishes; every content page and Canvas page is a WebPage published by that organization, in its own language (Schema.org Metatag); a news item is a NewsArticle too (mutamad_news)
BreadcrumbsWith schema.org BreadcrumbList markup; none in the admin pages or on the front page (Easy Breadcrumb)
VerificationFields for Google Search Console, Bing and other verification codes, so a site administrator can prove ownership without server access
Sitemap/sitemap.xml, one entry per language version with the others as alternates, rebuilt on cron; a page is listed only in the languages it exists in (Simple XML Sitemap). List pages that are Views — /services, /news — are listed when their view marks them (Simple XML Sitemap Views, installed here; each content-type recipe marks its own)
Page speedAnonymous visitors served from the page cache for 15 minutes; CSS and JavaScript aggregated

Each translation of a page links to the others with hreflang — core's content translation does that on every translated page — and to the version in the site's default language as x-default, for a visitor searching in neither (mutamad_multilingual). On a Mutamad site, a Canvas page's canonical address is absolute, and the home page's is the site's own (/ar, not /ar/home; mutamad_canvas_controls). A page with no image of its own is shared with the logo (the Mutamad theme).

Who manages it

This recipe creates no roles and grants no permissions, so it applies to any Drupal site without bringing the rest of Mutamad.

  • On a Mutamad site, the site template (mutamad_starter) gives site_admin everything needed to manage it.
  • On any other site, give the permissions below to your own roles.
  • On a Mutamad site that applies this recipe later with drush recipe, the site template has already run: add them to site_admin by hand (People → Roles → Site administrator → Edit permissions).
PermissionModule
Administer meta tagsMetatag
Administer URL aliases, Create URL aliasesPath (core)
Administer Pathauto, Bulk update URL aliasesPathauto
Administer redirects, Administer redirect settingsRedirect
Ignore 404 requestsRedirect 404
Administer sitemap settings, Edit entity sitemap settingsSimple XML Sitemap
Administer Easy BreadcrumbEasy Breadcrumb

Mutamad gives Administer redirects to no content role, and leaves Bulk delete URL aliases with the administrator — see below.

Each site adds its own

Mutamad fills the organization in from the site name and address. The rest is the entity's, set at Configuration → Search and metadata → Metatag → Front page by the site administrator:

  • the logo (Schema.org → Organization → Logo) — no token gives the theme's logo, and the address must be a PNG, JPG or SVG the site serves;
  • the address, telephone and same as links (the entity's official accounts);
  • the verification codes (Site verification);
  • a share image for link previews (Open Graph → Image), if not the logo.

And at Configuration → System → Basic site settings, the site name in Arabic as well as in English (Translate): it ends every page's title and names the organization, and an Arabic page otherwise ends in the English name.

Once the site is live, submit the sitemap to Google Search Console and Bing Webmaster Tools (https://<the site's address>/sitemap.xml), after the verification codes above. robots.txt does not name it: a sitemap is named there by its full address, which a distribution cannot know.

Content types add themselves to the sitemap when they are created (Structure → Content types → Edit → XML sitemap). A Mutamad site has none until mutamad_content_gov, so until then the sitemap lists the front page.

Choices, and why

  • Redirects are for the site administrator only. Redirect warns only when a redirect points inside the site, so whoever holds Administer redirects can send any address — the login page included — to another site, without a warning: phishing from the official domain. Drupal CMS gives it to the content editor. The redirect made automatically when an address changes needs no permission; editors get it without holding one. Give it with the same care on a site that is not Mutamad.
  • "Page not found" stays in the log. Drupal CMS suppresses it. A run of them is how a scan shows, and the log feeds the SIEM (mutamad_logging).
  • Bulk-deleting addresses is best left with the administrator: it removes every page address at once and makes no redirects.
  • Not drupal_cms_seo_basic. It installs the same modules and its settings are repeated here, but a recipe cannot take back the redirect permission it grants the content editor. Nor drupal_cms_seo_tools, which installs Layout Builder, Yoast SEO and ECA.
  • No x-default hreflang. It should name the original of a translated page, but Metatag's tokens always follow the language of the page being shown, so on a translation it would name the translation itself. A wrong x-default is worse than none; the per-language links are correct.
  • The sitemap is plain XML, which is what search engines read. Its styled view sorts a table with a script that calls jQuery's trim(), gone from the jQuery 4 that core ships, and raised a script error on every view.

Known limits

  • Arabic punctuation stays in addresses. Pathauto removes only the punctuation it lists, all of it Latin, so ؟, ، and ؛ remain: "ما الجديد؟" becomes /ما-الجديد؟. The address is valid and opens the page. Adding them to the list takes a code hook (pathauto#2039273).
  • Breadcrumbs say "Home" on Arabic pages until Arabic interface translations are installed.

Requirements

Drupal core 11.4. Composer brings Pathauto, Redirect, Token, Easy Breadcrumb, Metatag, Schema.org Metatag and Simple XML Sitemap. Nothing else from Mutamad is required.

Apply it to an existing site

composer require drupal/mutamad_seo
drush recipe ../recipes/mutamad_seo

Existing page addresses are kept; new and edited pages get addresses from the pattern. To regenerate the others — with redirects from the old addresses — use Configuration → Search and metadata → URL aliases → Bulk generate.

Then give the permissions under Who manages it to the role that will manage SEO. The recipe cannot take Administer redirects away from a role that already has it: check which roles do (People → Permissions, search for "redirects").

Licence

GPL-2.0-or-later.

Maintainers

iSpectra

Built and maintained by iSpectra (on drupal.org).