Inorder to achieve what you need, basically you need to study what are the traffics will be generated while accessing to the e.g domain http://www.domainname.com and https://www.domainname.com. Single domain that user are trying browse may involve multiple back end URLs need to be allowed in-order the webpage able to load successfully. Those URLs usually is transparent to end users.
Unless the website is a simple webpage (without involved any back end URLs), then I will say you can easily define a domain name to allow the traffics. Else if this is a complex website then I would say this is the tough jobs. You need to study the URLs involved & define the domain rules to allow the websites. Do note that you need to maintain the domain rules from time to times base on the destination servers as the static domain rules defined will not reflect to the changes for the destination servers.
Beside that, do note that, you need to study also the sub-domain involve for the domain URLs that the user need to browse. For example, after the webpage (https://www.domainname.com) successful loaded and users allow to sign-up/login from the loaded page, the sub-sequence for the action may refer to other sub-domain or domain, thus you need to also put those domain/sub-domain under consideration when you define the allow rules for the domain.
To analyze the domain URLs involved, you can use HTTP/URL monitor tools in the market to study the requires URLs: