Skip to content

Neocities

Neocities is a popular web hosting service for static pages. It’s common to encounter CORS errors when working with Neocities since you’re typically working with static-only apps, and most APIs require requests to be made from a backend server.

In this guide, we’ll fix CORS errors in Neocities using Corsfix, a secure proxy service that enables your application to communicate with any API without CORS restrictions.

Deploy your Neocities website as you normally would. Once deployed, you’ll find the URL of your website in your Neocities dashboard.

Neocities website URL Your Neocities website URL

Save this URL as you’ll need it for the next step.

Open the Corsfix dashboard and add your Neocities domain.

Adding domain Add your domain the Corsfix dashboard

After configuring the domain, your API requests through Corsfix will work successfully in your website.

Once everything is configured, open your website and test your API functionality. You should now see your requests successfully going through the Corsfix proxy without any CORS errors.

Successful API Request Your API requests should now work without CORS errors

Check your browser’s developer console, you should no longer see CORS-related error messages, and your API calls should complete successfully.

If you’re using a custom domain with your Neocities site, make sure to add your custom domain (e.g., yourdomain.com) to the origin domains in the Corsfix dashboard alongside the default Neocities URL.

If you are looking for how to fix Content-Security-Policy in Neocities, refer to this article: https://corsfix.com/blog/fix-neocities-content-security-policy