Title: CORS Solution not working
Last modified: September 17, 2019

---

# CORS Solution not working

 *  Resolved [obtenmiweb](https://wordpress.org/support/users/obtenmiweb/)
 * (@obtenmiweb)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/cors-solution-not-working/)
 * Hi,
 * The set-up went well but the snippet to fix the CORS Policy error didn’t do it.
 *     ```
       <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css)$">
       <IfModule mod_headers.c>
       Header add Access-Control-Allow-Origin "*"
       Header set Access-Control-Allow-Origin "*"
       </IfModule>
       </FilesMatch>
       ```
   
 * Part of my htaccess file looks like this:
 *     ```
       # BEGIN WordPress
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /index.php [L]
       </IfModule>
       <IfModule mod_php7.c>
           php_value memory_limit 256M
       </IfModule>
       # END WordPress
       # BEGIN AWS CDN 
       <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css)$">
       <IfModule mod_headers.c>
       Header add Access-Control-Allow-Origin "*"
       Header set Access-Control-Allow-Origin "*"
       </IfModule>
       </FilesMatch>
       # END AWS CDN 
       ```
   
 * This is one of the tutorials I followed for the AWS Setup:
    [Setup AWS CloudFront for WordPress](https://jeffreyeverhart.com/2018/12/07/setup-aws-cloudfront-for-wordpress-scaling-this-blog/)

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

 *  Plugin Author [luckychingi](https://wordpress.org/support/users/luckychingi/)
 * (@luckychingi)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/cors-solution-not-working/#post-11941411)
 * Hello [@obtenmiweb](https://wordpress.org/support/users/obtenmiweb/)
 * Did you try the steps on this page?
    [https://github.com/fontello/fontello/wiki/How-to-setup-server-to-serve-fonts](https://github.com/fontello/fontello/wiki/How-to-setup-server-to-serve-fonts)
 *  Thread Starter [obtenmiweb](https://wordpress.org/support/users/obtenmiweb/)
 * (@obtenmiweb)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/cors-solution-not-working/#post-11941533)
 * Added the following to .htaccess as it says in the Github repository and still
   get CORS error.
 *     ```
       # END WordPress
       AddType font/ttf                         ttf
       AddType font/otf                         otf
       AddType font/woff                        woff
       AddType font/woff2                       woff2
       AddType application/vnd.ms-fontobject    eot
       <FilesMatch ".(eot|ttf|otf|woff|woff2)">
         Header set Access-Control-Allow-Origin "*"
       </FilesMatch>
       ```
   
 * The log I’m getting is the following:
    `SEC7120: [CORS] The origin 'https://domainname.
   com' did not find 'https://domainname.com' in the Access-Control-Allow-Origin
   response header for cross-origin font resource at 'https://d1wwhmx7g3g9x.cloudfront.
   net/wp-content/plugins/theme-addons/assets/fonts/Linearicons.ttf?fgpewa'.`
    -  This reply was modified 6 years, 8 months ago by [obtenmiweb](https://wordpress.org/support/users/obtenmiweb/).
 *  Plugin Author [luckychingi](https://wordpress.org/support/users/luckychingi/)
 * (@luckychingi)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/cors-solution-not-working/#post-11941640)
 * Which icons aren’t showing on the site?
 * I didnt see any error in the dev console
 *  Thread Starter [obtenmiweb](https://wordpress.org/support/users/obtenmiweb/)
 * (@obtenmiweb)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/cors-solution-not-working/#post-11941663)
 * I replaced the real domain name in my last reply. The icons that are not showing
   up are in the main menu of my site. Here’s a list of all the CORS errors:
 * [Here](https://d1wwhmx7g3g9x.cloudfront.net/)‘s cloudfront pointing to my domain.
    -  This reply was modified 6 years, 8 months ago by [obtenmiweb](https://wordpress.org/support/users/obtenmiweb/).
 *  Plugin Author [luckychingi](https://wordpress.org/support/users/luckychingi/)
 * (@luckychingi)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/cors-solution-not-working/#post-11941808)
 * [https://ibb.co/ct1S5xP](https://ibb.co/ct1S5xP)
 * I can see the icons here on my computer.
 *  Plugin Author [luckychingi](https://wordpress.org/support/users/luckychingi/)
 * (@luckychingi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/cors-solution-not-working/#post-11953010)
 * Marking this as resolved as icons are visible on the website

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

The topic ‘CORS Solution not working’ is closed to new replies.

 * ![](https://ps.w.org/aws-cdn-by-wpadmin/assets/icon-256x256.jpg?rev=2647571)
 * [WPAdmin AWS CDN](https://wordpress.org/plugins/aws-cdn-by-wpadmin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/aws-cdn-by-wpadmin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/aws-cdn-by-wpadmin/)
 * [Active Topics](https://wordpress.org/support/plugin/aws-cdn-by-wpadmin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/aws-cdn-by-wpadmin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/aws-cdn-by-wpadmin/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [luckychingi](https://wordpress.org/support/users/luckychingi/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/cors-solution-not-working/#post-11953010)
 * Status: resolved