{"record":{"id":"4b7e4842e585a587","repo":"gohugoio/hugo","slug":"urls-with-protocol-http-not-supported-q-in-p","errorCode":null,"errorMessage":"URLs with protocol (http*) not supported: %q. In page %q","messagePattern":"URLs with protocol \\(http\\*\\) not supported: %q\\. In page %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hugolib/page__meta.go","lineNumber":722,"sourceCode":"\t\t\tpcfg.Title = cast.ToString(v)\n\t\t\tpcfg.Params[loki] = pcfg.Title\n\t\tcase \"linktitle\":\n\t\t\tpcfg.LinkTitle = cast.ToString(v)\n\t\t\tpcfg.Params[loki] = pcfg.LinkTitle\n\t\tcase \"summary\":\n\t\t\tpcfg.Summary = cast.ToString(v)\n\t\t\tpcfg.Params[loki] = pcfg.Summary\n\t\tcase \"description\":\n\t\t\tpcfg.Description = cast.ToString(v)\n\t\t\tpcfg.Params[loki] = pcfg.Description\n\t\tcase \"slug\":\n\t\t\t// Don't start or end with a -\n\t\t\tpcfg.Slug = strings.Trim(cast.ToString(v), \"-\")\n\t\t\tpcfg.Params[loki] = pm.Slug()\n\t\tcase \"url\":\n\t\t\turl := cast.ToString(v)\n\t\t\tif strings.HasPrefix(url, \"http://\") || strings.HasPrefix(url, \"https://\") {\n\t\t\t\treturn fmt.Errorf(\"URLs with protocol (http*) not supported: %q. In page %q\", url, ps.pathOrTitle())\n\t\t\t}\n\t\t\tpcfg.URL = url\n\t\t\tpcfg.Params[loki] = url\n\t\tcase \"type\":\n\t\t\tpcfg.Type = cast.ToString(v)\n\t\t\tpcfg.Params[loki] = pcfg.Type\n\t\tcase \"keywords\":\n\t\t\tpcfg.Keywords = cast.ToStringSlice(v)\n\t\t\tpcfg.Params[loki] = pcfg.Keywords\n\t\tcase \"headless\":\n\t\t\t// Legacy setting for leaf bundles.\n\t\t\t// This is since Hugo 0.63 handled in a more general way for all\n\t\t\t// pages.\n\t\t\tisHeadless := cast.ToBool(v)\n\t\t\tpcfg.Params[loki] = isHeadless\n\t\t\tif isHeadless {\n\t\t\t\tpm.pageConfig.Build.List = pagemeta.Never\n\t\t\t\tpm.pageConfig.Build.Render = pagemeta.Never","sourceCodeStart":704,"sourceCodeEnd":740,"githubUrl":"https://github.com/gohugoio/hugo/blob/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/hugolib/page__meta.go#L704-L740","documentation":"Front-matter validation in the `url` case (page__meta.go:722). Hugo lets you override a page's output URL via the `url` front-matter key, but only with a path-relative value; an absolute http(s):// URL is rejected because it would break permalink/permalink resolution and is almost always a user mistake.","triggerScenarios":"Setting `url: https://example.com/foo/` (or http://) in a page's front matter. The check triggers on the 'http://' or 'https://' prefix before assignment.","commonSituations":"Pasting a full external link into `url` thinking it sets a redirect; migrating from another SSG that allowed absolute URLs in its equivalent field.","solutions":["Use a path-relative URL: `url: /foo/` or `url: /foo/index.html`.","For redirects use the `aliases` field (also path-relative) or a redirect plugin.","Remove the scheme/host from the url value entirely."],"exampleFix":"// before\n---\nurl: https://example.com/foo/\n---\n\n// after\n---\nurl: /foo/\n---","handlingStrategy":"validation","validationCode":"# reject absolute http(s) url front matter\nurl='https://example.com/'\ncase \"$url\" in http://*|https://*) echo \"use a path-relative url\";; esac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use path-relative values in the `url` front-matter key.","Use aliases or a redirect service for external redirects.","Add a pre-commit hook stripping schemes from url front matter."],"tags":["front-matter","url","validation","page"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}