I don't like this. The misconfiguration mistake can happen equally on the servers. How about:

```python
if site_url != req_url:
    msg = 'Misconfigured ...'
    if settings.DEBUG:
        raise ImproperlyConfigured(msg)
    else:
        log.warning(msg)
```