diff --git a/templates/index.html b/templates/index.html
index e402cbf..c59ce9c 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -30,7 +30,7 @@
{% endif -%}
{# Create variable to allow appending index.html at end of links if set in config #}
- {% if not config.extra.easydocs_uglyurls -%}
+ {% if not config.extra.easydocs_uglyurls or config.mode == "Serve" -%}
{% set _ugly_url = "" -%}
{% else %}
{% set _ugly_url = "index.html" -%}