Hosted Webapps
RestAPI.com hosts your static websites and single-page applications (SPAs) with automatic SSL and CDN distribution.
Hosting Your App
Subdomain Hosting
Your app is accessible at:
https://<api-name>.restapi.cloud
Example:
https://my-app.restapi.cloud
Custom Domains
Use your own domain with managed SSL certificates:
https://www.my-domain.com
Configure custom domains in the Developer Portal under your API's settings.
Supported Frameworks
Any static site or SPA works, including:
- React
- Angular
- Vue
- Svelte
- Static HTML/CSS/JS
Deployment Options
Developer Portal
Upload your build files directly through the portal's File Explorer.
CI/CD Pipelines
Deploy automatically from:
- GitHub Actions
- Azure DevOps
Virtual Paths
Hosted apps access APIs through virtual paths, eliminating CORS configuration:
| Path | Description |
|---|---|
/<region>-api | Region-specific, CORS-free |
/api | Region-free, CORS-free |
/login | Hosted authentication page |
Examples
Instead of calling:
fetch('https://eu.restapi.com/my-api/products')
Use the virtual path:
fetch('/eu-api/my-api/products')
// or
fetch('/api/my-api/products')
No CORS headers needed. The request is handled internally.
Full URL Examples
https://my-app.restapi.cloud/eu-api/my-api/products
https://www.my-domain.com/api/my-api/products
The region-free /api path may have slightly higher latency than region-specific paths like /eu-api.
CORS Configuration
If you need to access your API from external domains (not your hosted app), configure CORS in the Developer Portal:
- Navigate to Security → CORS
- Add allowed origins
For hosted apps using virtual paths, CORS configuration is not required.
Authentication
Use the hosted login page at /login for user authentication:
https://my-app.restapi.cloud/login
This provides a ready-to-use authentication UI with your configured identity providers.