Skip to main content

Hi Klaviyo’s team/community,

 

Someone know why I can't import my custom font from my Self-Hosted site?

From Shopify servers works fine, but from a cPanel/WordPress/Woocommerce doesn’t it.

I have tested with .woff or .woff2, all the time with all file’s privileges (777) .

 

I can't find info about this issue on your forum.

 

Please, help me.

Thanks in advance.

Hey @cl4udio 

Welcome to the community! Thanks for asking for help with your custom font.

Can you share a little more on what you mean it wont work. Are you getting an error? If so, what error are you getting?

Often times we see an error with the CORS settings. Make sure to enable Cross-Origin Resource Sharing (CORS) by setting the Access-Control-Allow-Origin header to *, so the font can be accessed by your recipients’ inboxes. Learn more about CORS. 

I’ll be in the lookout for your response!


Hi @stephen.trumble 

After adding the CORS parameter to the “.htaccess” file, it works like a charm! 😎

 

Thank you very much.


Hey @cl4udio 

I’m so glad you were able to get it solved! Thanks again for being part of the community. Looking forward to seeing you here again!


Hi @stephen.trumble 

After adding the CORS parameter to the “.htaccess” file, it works like a charm! 😎

 

Thank you very much.

 

Hi @cl4udio, how did you find exactly what to add to the .htaccess file from the provided link?
I’m trying to do the same thing at the moment.

Any help would be greatly appreciated.


Hi @fandf ,

 

Just add the following parameters to the .htaccess file:

<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>

Here an example if you’re using WordPress:

 

Official APACHE source: https://enable-cors.org/server_apache.html

 

Tell me if this works well for you... 😎


@cl4udio all working perfectly. Thanks so much. 

That’s one less stressor for today. Thank you!


Reply