Metadata and discoverability
Page title, description, and canonical URL
Views supply ViewBag.Title, Description, Keywords, and Authors; CodeHelper supplies shared fallback behavior. _Layout renders ordinary metadata and organization structured data. Its default canonical URL is the site base plus request path, excluding the query string. A view can override this through ViewBag.CanonicalUrl. The 2027 article view supplies a quick-ID/normalized-title canonical path.
Use the site's base URL helpers rather than hardcoding localhost or a deployment domain. Verify generated URLs behind the intended hosting setup, especially when request scheme/host differ through a proxy. Preserve established article, issue, service, event, and author URLs when changing labels or presentation.
Social previews
The layout checks the outer page model for ISharable. SharableViewModel provides the usual implementation; models with another required base class can implement the interface directly, as consulting detail does. Populate SharingInformation.Title, Description, and ImageUrl before layout rendering. Keep ordinary ViewBag metadata too, since it serves the page title and non-social description.
GetMetaTags assigns the current URL and emits Open Graph/Twitter metadata. Attribute values are HTML-encoded; descriptions longer than 197 characters are shortened with an ellipsis. Descriptions should already be plain text: this generator does not strip HTML. Absolute public image URLs are required for useful crawler access; known dimensions can be supplied, while default negative dimensions omit the tags. HTTPS images also get the secure image tag.
The ViewBag fallback path has its image helpers commented out. Setting ViewBag.ogImage alone does not enable an image preview. A hero image or partial model implementing ISharable also does not automatically supply the outer model's sharing information.
Use the page-sharing skill for changes. Inspect the rendered head for title, description, URL, card type, and image tags, then open the image anonymously. Local markup verification is separate from a public crawler preview and from the platform's cached preview. Beware mutable sharing state on cached models.
Sitemap and robots
sitemap.xml is registered for every site mode. SitemapController builds XML from consulting service slugs, magazine issues, and future events. It logs errors per data group and can return partial output when a group fails. It does not enumerate all articles or past events. A 200 response therefore does not prove completeness or that every generated destination is appropriate to every mode; check sample URLs against the active routes.
CODE.com/wwwroot/robots.txt is the static crawler policy. Keep sitemap changes, crawler policy, canonical URLs, and actual route availability consistent. Neither robots rules nor a menu omission is an authorization mechanism.
Marketing attribution
UtmSourceMiddleware captures utm_* query values into session. CodeHelper and CodeController expose attribution helpers; selected cross-site menu links preserve UTM codes through shared URL generation. Use that generator for shared navigation rather than assembling replacement links that discard attribution. SessionStateController is an authorized diagnostic view for these values.
The layout also loads analytics and social tracking scripts. If a browser-only issue varies with tracking protection, inspect blocked requests and console errors separately from MVC/service failures.