diff --git a/udata/sitemap.py b/udata/sitemap.py
index <HASH>..<HASH> 100644
--- a/udata/sitemap.py
+++ b/udata/sitemap.py
@@ -24,5 +24,5 @@ def load_page(fn):
 
 def init_app(app):
     app.config['SITEMAP_VIEW_DECORATORS'] = [load_page]
-    app.config['SITEMAP_URL_METHOD'] = 'https'
+    app.config['SITEMAP_URL_METHOD'] = 'https' if app.config['USE_SSL'] else 'http'
     sitemap.init_app(app)
Only use https URLs when USE_SSL is True