I generate sitemap.xml on the development server, but instead of 127.0.0.1 I get example.com in he URL. I have nowhere in the code reference to example.com.
-<urlset>
-<url>
<loc>http://example.com/xxxx/ABCDE/</loc>
-</url>
-</urlset>
What needs to be changed and where? Thank you
urls.py
from django.contrib import admin
from django.urls import path, include
from django.conf.urls.i18n import i18n_patterns
from django.contrib.sitemaps.views import sitemap
from ael.sitemaps import StaticViewSitemap, CrossRefTableSitemap
from ael import views as ael_views
from django.contrib.sitemaps import views as sitemaps_views
from django.views.decorators.cache import cache_page
sitemaps = {
'static': StaticViewSitemap,
'crossreftable': CrossRefTableSitemap,
}
urlpatterns = [
path('admin/', admin.site.urls),
path('i18n/', include('django.conf.urls.i18n')),
path('sitemap.xml',
cache_page(86400)(sitemaps_views.index),
{'sitemaps': sitemaps, 'sitemap_url_name': 'sitemaps'}),
path('sitemap-<section>.xml',
cache_page(86400)(sitemaps_views.sitemap),
{'sitemaps': sitemaps}, name='sitemaps'),
path('start_page/', ael_views.start_page, name='start_page'),
path('search_form/', ael_views.search_form, name = 'search_form'),
path('smap_detail/<str:smapnr>/', ael_views.smap_detail, name = 'smap_detail'),
]
urlpatterns += i18n_patterns(
path('ael/', include('ael.urls')),
)