The present application relates to compounds of formula (I), wherein R1 to R6, Q1 and A1 to AS are as described herein, and their pharmaceutically acceptable salt thereof, and compositions including the compounds and methods of using the compounds. The compounds of formula (I) are antagonists of STING and thus useful for the treatment of various diseases and disorders.