First time here? Check out the FAQ!

Three different domains for js,css and images


I want to host my different types of static files on different domains. I have all the static files from domain other than the main askbot domain but I want to break it down to three different domains by type to increase parallel download. How can I do it in django / askbot ?

anshprat's avatar
asked 2013-09-26 05:55:32 -0500, updated 2013-09-26 11:40:36 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


You'll have to modify the STATIC_URL and MEDIA_URL in your

There is no support currently for separate domains for css, js or other static files. They must all go in one domain, which however could be different from the main application domain.

Fitoria's avatar
answered 2013-09-26 11:43:47 -0500
Evgeny's avatar
updated 2013-09-30 00:44:20 -0500
edit flag offensive 0 remove flag delete link


@Fitoria I am using STATIC_URL but that sets all static urls to just one another domain. I want something like js being loaded from and css from and images from

anshprat's avatar anshprat (2013-09-26 12:44:43 -0500) edit

Not sure on how to make it with this case, maybe making a template tag/filter for static media that changes the url according to the media type?

Fitoria's avatar Fitoria (2013-09-27 16:12:35 -0500) edit

@Fitoria if there could be something like STATIC_JS_URL , STATIC_CSS_URL and STATIC_IMG_URL with default values being STATIC_URL, makes sense?

anshprat's avatar anshprat (2013-09-28 07:56:07 -0500) edit

@anshprat there are not such settings for that, let me do some research on how to do it

Fitoria's avatar Fitoria (2013-09-29 11:34:11 -0500) edit
add a comment see more comments