Title: Activating CORS
Last modified: August 27, 2018

---

# Activating CORS

 *  Resolved [ULinn](https://wordpress.org/support/users/ulinn/)
 * (@ulinn)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/activating-cors/)
 * Hello,
 * my theme uses fontawesome. If I access the main site, everythings perfect, but
   if I acces another domain defined in the multidomain-plugin, the fa-icons are
   not shown.
 * In the console I see a Cross-Origin-Error.
 * I already found out, that using
    `Header set Access-Control-Allow-Origin "*"`
   in the .htaccess could solve this.
 * It does work, but I would like not to allow “*” but only those domains used in
   multidomain. I tried to replace the “*” with “[https://www.mydomain.de/&#8221](https://www.mydomain.de/&#8221);,
   but now the Cross-Origin-Error is back again.
 * Do you have any hint how to solve this?
 * Best regards
 * Uli

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [matthias.wagner](https://wordpress.org/support/users/matthiaswagner/)
 * (@matthiaswagner)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/activating-cors/#post-10627635)
 * [http://lmgtfy.com/?q=apache+cors+specific+domains](http://lmgtfy.com/?q=apache+cors+specific+domains)
   
   😉
 *  Thread Starter [ULinn](https://wordpress.org/support/users/ulinn/)
 * (@ulinn)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/activating-cors/#post-10627743)
 * Hi Matthias,
 * its always good to know, what too look for. I did search CORS in this forum and
   several combinaions with cors at goole, but everything I found, did not work.
 * But your hint brought me to this:
 *     ```
       # ----------------------------------------------------------------------
       # Allow loading of external fonts
       # ----------------------------------------------------------------------
       <FilesMatch "\.(ttf|otf|eot|woff)$">
           <IfModule mod_headers.c>
               SetEnvIf Origin "http(s)?://(www\.)?(google.com|staging.google.com|development.google.com|otherdomain.example|dev02.otherdomain.example)$" AccessControlAllowOrigin=$0
               Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
               Header merge Vary Origin
           </IfModule>
       </FilesMatch>
       ```
   
 * First of all, I did enter only the domain on wich was mentionned in the consloes
   error-message (the “main domain”) but this did not solve the poblem.
 * But: Entering **all** domains that are listet in multidomain solved it. I don’t
   understand why, but the main thing is: it works!
 * Probably this information will also be helpfull for other users.
 * Best regards
 * Uli
 *  Plugin Author [matthias.wagner](https://wordpress.org/support/users/matthiaswagner/)
 * (@matthiaswagner)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/activating-cors/#post-10627839)
 * great to hear and thank you for the code 🙂
 * matt

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Activating CORS’ is closed to new replies.

 * ![](https://ps.w.org/multiple-domain-mapping-on-single-site/assets/icon-256x256.
   png?rev=1595238)
 * [Multiple Domain Mapping on Single Site](https://wordpress.org/plugins/multiple-domain-mapping-on-single-site/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multiple-domain-mapping-on-single-site/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-domain-mapping-on-single-site/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-domain-mapping-on-single-site/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-domain-mapping-on-single-site/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-domain-mapping-on-single-site/reviews/)

## Tags

 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * 3 replies
 * 2 participants
 * Last reply from: [matthias.wagner](https://wordpress.org/support/users/matthiaswagner/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/activating-cors/#post-10627839)
 * Status: resolved