# Leaving base\_url empty

**URL:** <https://zola.discourse.group/t/leaving-base-url-empty/1585>\
**Category:** Feature requests\
**Created:** [January 2, 2023, 8:08pm UTC](https://zola.discourse.group/t/leaving-base-url-empty/1585 "2023-01-02T20:08:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ignon](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/ignon/32/888_2.png) [@ignon](https://zola.discourse.group/u/ignon)\
**Post date:** [January 2, 2023, 8:08pm UTC](https://zola.discourse.group/t/leaving-base-url-empty/1585/1 "2023-01-02T20:08:10Z")

</div>

Hi! I might be missing something but why doesn’t Zola let me assign base\_url to a value of an empty string. There’s no need for the relative or absolute links to contain the domain name, the browser adds them automatically. If I click `<a href="/archive">Archive</a>` link on website `myblog.com` the browser automatically sends me to `myblog.com/archive`.

Currently Zola hardcodes all links with the full domain (`mywebsiteurl.com/path` instead of /path). This makes testing a lot harder, and you can’t access the website with IP address (important mostly when testing, or when the domain stops working etc). I can’t see a single good reason for this. base\_url = “/” doesn’t work either because then links start with “//myurl”

Should I create a Github issue or is there something I’m missing? Thanks!

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [January 2, 2023, 8:12pm UTC](https://zola.discourse.group/t/leaving-base-url-empty/1585/2 "2023-01-02T20:12:38Z")

</div>

There’s no way to have an empty base\_url no, that’s intentional.

> [@ignon](#):
>
> This makes testing a lot harder, and you can’t access the website with IP address (important mostly when testing, or when the domain stops working etc)

What do you mean it’s harder? You need to use `zola serve` for local testing

---

<div class="post-metadata">

**Author:** ![ignon](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/ignon/32/888_2.png) [@ignon](https://zola.discourse.group/u/ignon)\
**Post date:** [January 2, 2023, 8:20pm UTC](https://zola.discourse.group/t/leaving-base-url-empty/1585/3 "2023-01-02T20:20:11Z")

</div>

I just can’t see the reason for hardcoding the domain name to website links. I’d like to serve my site on my web server and keep a mirror on Github Pages. And I’d like to test the deployment on my web server before getting a domain name. Now every situation needs a custom build script or Github pipeline when zero would be enough. I can’t see any upsides to hardcoding URL:s like that.

Is there a reason for disabling empty base\_url that I’m missing?

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [January 2, 2023, 10:37pm UTC](https://zola.discourse.group/t/leaving-base-url-empty/1585/4 "2023-01-02T22:37:49Z")

</div>

> [@ignon](#):
>
> Is there a reason for disabling empty base\_url that I’m missing?

Sitemap and feeds do require an absolute URL.

---

<div class="post-metadata">

**Author:** ![JoshyOrndorff.eth](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@JoshyOrndorff.eth](https://zola.discourse.group/u/JoshyOrndorff.eth)\
**Post date:** [February 25, 2025, 10:15pm UTC](https://zola.discourse.group/t/leaving-base-url-empty/1585/5 "2025-02-25T22:15:29Z")

</div>

For me this is a very important issue and maybe a deal breaker for using zola.

Some very concrete usecases:

- Publishing on IPFS where a user may use any arbitrary URL that happens to have an IPFS node running.
- Serve my site on my web server and keep a mirror on Github Pages
- Access my site via IP address when DNS hasn’t updated or is otherwise slow, broken, or inconvenient
- Host my site at my main URL, but also at my legacy URL that some people might still have bookmarked

The counterpoint that “Sitemap and feeds do require an absolute URL” also has validity, but this is no reason to still hardcode the base URL in stylesheet links and etc. Some sites don’t even use feeds, and while sitemaps are nice, I would argue they are secondary to the site itself and could perhaps be optional if no canonical base\_url is provided.

---

<div class="post-metadata">

**Author:** ![austenjt](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/austenjt/32/1503_2.png) [@austenjt](https://zola.discourse.group/u/austenjt)\
**Post date:** [July 28, 2025, 6:22pm UTC](https://zola.discourse.group/t/leaving-base-url-empty/1585/6 "2025-07-28T18:22:43Z")

</div>

I recently ran into this issue as well. I agree with JoshyOrndorff.eth above (except for holding Urethreum, which is a scam) . My reason is the below use case that Zola does NOT seem to support:

**1. Masked DNS Redirect (Cloaked/Framed Redirect)**

- What it does: The browser displays the original domain in the address bar, but the content is loaded from the destination URL. This is achieved using an HTML frame or iframe.

- How it works: When a user visits your domain, the server loads the content from the target URL (e.g., a target site on back-end) without changing the visible URL in the browser.

- Use cases:

- Pros:

- Cons:

- When to use: Choose Masked when branding is critical, and you don’t mind potential functionality or SEO trade-offs (e.g., redirecting to a third-party service like a shop or form).
