# Page.OutputFormats.\*.Permalink has http scheme, not https

**URL:** <https://discourse.gohugo.io/t/page-outputformats-permalink-has-http-scheme-not-https/46372>\
**Category:** support\
**Created:** [September 24, 2023, 12:52am UTC](https://discourse.gohugo.io/t/page-outputformats-permalink-has-http-scheme-not-https/46372 "2023-09-24T00:52:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![will](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/will/32/18403_2.png) [@will](https://discourse.gohugo.io/u/will)\
**Post date:** [September 24, 2023, 12:52am UTC](https://discourse.gohugo.io/t/page-outputformats-permalink-has-http-scheme-not-https/46372/1 "2023-09-24T00:52:59Z")

</div>

[Paige](https://willfaught.com/paige/atom.xml) has:

```xml
<link href="http://willfaught.com/paige/atom.xml" rel="self" type="application/atom+xml"/>
<link href="http://willfaught.com/paige/index.json" rel="alternate" type="application/json"/>
<link href="http://willfaught.com/paige/rss.xml" rel="alternate" type="application/rss+xml"/>

```

This is resulting in [W3C Feed Validation Service, for Atom and RSS](https://validator.w3.org/feed) reporting an error:

> Self reference doesn’t match document location

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [September 24, 2023, 1:53am UTC](https://discourse.gohugo.io/t/page-outputformats-permalink-has-http-scheme-not-https/46372/2 "2023-09-24T01:53:58Z")

</div>

baseURL?

---

<div class="post-metadata">

**Author:** ![ju52](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ju52/32/6749_2.png) [@ju52](https://discourse.gohugo.io/u/ju52)\
**Post date:** [September 24, 2023, 8:51am UTC](https://discourse.gohugo.io/t/page-outputformats-permalink-has-http-scheme-not-https/46372/3 "2023-09-24T08:51:30Z")

</div>

better to use RelPermalink in the templates

ex:

```auto
    {{ with site.Home.OutputFormats.Get "FEED"}}<atom:link href="{{.RelPermalink}}" rel="self" type="{{ safeHTML .MediaType.Type }}" />{{end}}
    {{ with site.Home.OutputFormats.Get "ATOM"}}<atom:link href="{{.RelPermalink}}" rel="alternate" type="{{ safeHTML .MediaType.Type }}" />{{end}}
    {{ with site.Home.OutputFormats.Get "JSON"}}<atom:link href="{{.RelPermalink}}" rel="alternate" type="{{ safeHTML .MediaType.Type }}" />{{end}}

```

I have it explicit defined in my config

```auto

[mediaTypes]
  [mediaTypes."application/atom+xml"]
    suffixes = ["xml"]

  [mediaTypes."application/rss+xml"]
    suffixes = ["xml"]

  [mediaTypes."application/feed+json"]
    suffixes = ["json"]

[outputFormats.JSON]
    mediaType = "application/json"
    baseName = "feeds/feed"
    rel = "alternate"
    isPlainText = true
    isHTML = false
    noUgly = false

[outputFormats.FEED] ##### ==> no collision with buildin RSS!
    mediaType = "application/rss+xml"
    baseName = "feeds/feed.rss"
    rel = "alternate"
    isPlainText = false
    isHTML = false
    noUgly = true

[outputFormats.ATOM]
    mediaType = "application/atom+xml"
    baseName = "feeds/feed.atom"
    rel = "alternate"
    isPlainText = false
    isHTML = false
    noUgly = true

```

---

<div class="post-metadata">

**Author:** ![will](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/will/32/18403_2.png) [@will](https://discourse.gohugo.io/u/will)\
**Post date:** [September 24, 2023, 9:29pm UTC](https://discourse.gohugo.io/t/page-outputformats-permalink-has-http-scheme-not-https/46372/4 "2023-09-24T21:29:21Z")

</div>

> baseURL?

I think that was it. The site was deployed with GitHub Pages, and “Enforce HTTPS” wasn’t enabled, so I think base\_url in `hugo --baseURL ${{ steps.pages.outputs.base_url }}` was “http”, not “https”. I now see `<atom:link href="https://willfaught.com/paige/atom.xml" rel="self" type="application/rss+xml"/>` (note the “https”) live, so the scheme is now fixed! 🎉 Thanks.

Edit: I put my other problem into its own post: [RSS permalink is Atom permalink somehow](https://discourse.gohugo.io/t/rss-permalink-is-atom-permalink-somehow/46388)

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [September 26, 2023, 9:29pm UTC](https://discourse.gohugo.io/t/page-outputformats-permalink-has-http-scheme-not-https/46372/5 "2023-09-26T21:29:22Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
