Robots.txt & Sitemap Generator

Stateless — no uploads, no server storage. Share via URL.
Back to tools
How to use
  1. Select a preset (recommended) or configure manually.
  2. Click Generate to update outputs.
  3. Copy / Download in your browser only.
  4. Share the URL to share the exact settings.
Presets reload with parameters (stateless).
No protocol. Example: mofidtech.com
Reset
✅ No server storage. Output is generated from query parameters.
# django_sitemaps.py
# Example Django sitemap setup.
#
# 1) pip install django
# 2) Add 'django.contrib.sites' and 'django.contrib.sitemaps' to INSTALLED_APPS
# 3) Set SITE_ID = 1
# 4) Create sitemaps classes below and wire urls (see django_urls.py tab)

from django.contrib.sitemaps import Sitemap
from django.urls import reverse


class StaticViewSitemap(Sitemap):
    priority = 0.8
    changefreq = "weekly"

    def items(self):
        return [
            "home",
            # "tools:home",
            # "blog:index",
        ]

    def location(self, item):
        return reverse(item)


# Example: Blog posts sitemap (replace with your model)
# from blog.models import Post
# class BlogSitemap(Sitemap):
#     changefreq = "weekly"
#     priority = 0.7
#     def items(self):
#         return Post.objects.filter(is_published=True).order_by("-updated_at")
#     def lastmod(self, obj):
#         return obj.updated_at
Active: django_sitemaps.py
Tip: share this URL to share settings.