# .Permalink not "permalinking"?

**URL:** <https://discourse.gohugo.io/t/permalink-not-permalinking/42613>\
**Category:** support\
**Created:** [January 24, 2023, 9:22pm UTC](https://discourse.gohugo.io/t/permalink-not-permalinking/42613 "2023-01-24T21:22:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bradbice](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bradbice/32/14162_2.png) [@bradbice](https://discourse.gohugo.io/u/bradbice)\
**Post date:** [January 24, 2023, 9:22pm UTC](https://discourse.gohugo.io/t/permalink-not-permalinking/42613/1 "2023-01-24T21:22:28Z")

</div>

I’m sure I’m missing something here, but in the following code in my `rss.xml` I have

```auto
<item>
      <title>{{ if ne .Type "micro" }}{{ .Title }}{{ end }}{{if eq .Type "micro"}}{{ htmlUnescape .Content }}{{ end }}</title>
      <link>{{ .Permalink }}</link>
      <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
      {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
      <guid>{{ .Permalink }}</guid>
      <description>{{ .Content | html }}</description>
    </item>

```

Which renders to

```auto
<item>
<title>
<p>Testing cross posting from my blog to other services</p>
</title>
<link>/micro/2022-12-27-testmicro2/</link>
<pubDate>Tue, 27 Dec 2022 00:00:00 +0000</pubDate>
<guid>/micro/2022-12-27-testmicro2/</guid>
<description>
<p>Testing cross posting from my blog to other services</p>
</description>
</item>
---

Why are my permalinks being rendered as relative and not absolute?
```

---

<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:** [January 24, 2023, 9:25pm UTC](https://discourse.gohugo.io/t/permalink-not-permalinking/42613/2 "2023-01-24T21:25:16Z")

</div>

What’s your baseURL?

---

<div class="post-metadata">

**Author:** ![bradbice](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bradbice/32/14162_2.png) [@bradbice](https://discourse.gohugo.io/u/bradbice)\
**Post date:** [January 24, 2023, 9:30pm UTC](https://discourse.gohugo.io/t/permalink-not-permalinking/42613/3 "2023-01-24T21:30:23Z")

</div>

`baseURL = ""`

This has worked for me in the past because it has allowed me to test via `localhost`. Assuming there’s a better way?

---

<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:** [January 24, 2023, 9:33pm UTC](https://discourse.gohugo.io/t/permalink-not-permalinking/42613/4 "2023-01-24T21:33:38Z")

</div>

The baseURL should be set to the fully qualified domain, including a trailing slash.

You can still test with Hugo server. It replaces the protocol+host+domain portion of the URL with `http://localhost:1313/`

---

<div class="post-metadata">

**Author:** ![bradbice](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bradbice/32/14162_2.png) [@bradbice](https://discourse.gohugo.io/u/bradbice)\
**Post date:** [January 24, 2023, 9:42pm UTC](https://discourse.gohugo.io/t/permalink-not-permalinking/42613/5 "2023-01-24T21:42:22Z")

</div>

Ah, thank you. That does it and all is well now.

---

<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:** [January 26, 2023, 9:42pm UTC](https://discourse.gohugo.io/t/permalink-not-permalinking/42613/6 "2023-01-26T21:42:55Z")

</div>

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