Skip to main content
Resend Docs
current

Search documentation

Type to search this documentation.

On this pageOverview

How to fix CORS issues

Information on recommended options to avoid CORS errors when sending emails.

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