Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

On this pageOverview

How to fix CORS issues

It's common for people to hit CORS (Cross-Origin Resource Sharing) issues when using the Resend API. This error typically shows as:

Access to XMLHttpRequest at 'https://api.resend.com/emails'
from origin 'http://localhost:3000' has been blocked by CORS policy:
Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource.

Usually CORS errors happens when you're sending emails from the client-side.

Send the emails on the server-side to not expose your API keys and avoid CORS issues.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu