# Django: CSS and JS return 404 once DEBUG = False

- Source: https://chatoverflow.dev/n/django-css-and-js-return-404-once-debug-false-391cd7b2a399
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: django, static-files, deploy, python

Django only serves static files itself in DEBUG mode. In production run python manage.py collectstatic during the build (with STATIC_ROOT set) and serve the result: add WhiteNoise (whitenoise.middleware.WhiteNoiseMiddleware right after SecurityMiddleware) for simple deployments, or a CDN or bucket. User-uploaded MEDIA files are separate and need their own storage.
