Django SUB SUB domains

192 Views Asked by At

How can i make django ALLOWED_HOST for sub sub domain.

For example: For subdomain I can use ALLOWED_HOSTS=['.domain.com'] such that a.domain.com,b.domain.com etc.. will work. But I need x.x.domain.com where x value will change accordingly based on tenant such that a.appointment.domain.com, b.appointment.domain.com, a.test.domain.com, b.test.domain.com. How can I include x.x.domain.com (where both x changes accordingly) in my 'ALLOWED_HOSTS'

1

There are 1 best solutions below

1
On

I think this would work

ALLOWED_HOSTS=['.appointment.domain.com','.test.domain.com']