How to set domains programmatically python

i want to create a blog service , how should i set users domains to his services (like blogger)??
any best idea ? (now i’m editing bind9 and nginx site-enables as file)

You want to know how to host websites?
PS. You have made a duplicate forum post I notice.
Try not to spam the forum with the same question. You can always edit your original question.