Why Add UCP to Wix?
Wix powers millions of online stores worldwide. Adding UCP (Universal Commerce Protocol) support makes your Wix store discoverable by AI shopping assistants, enabling automatic product discovery and purchases.
- Visual Editor: Add UCP without deep technical knowledge
- Velo by Wix: Use Wix's development platform for custom implementations
- Built-in Hosting: No server configuration needed
- Wix Stores Integration: Works seamlessly with Wix eCommerce
Implementation Methods
| Method | Difficulty | Requirements |
|---|---|---|
| Wix App (Recommended) | Easy | Any Wix eCommerce plan |
| Velo Backend | Medium | Velo-enabled plan |
| External Hosting | Medium | Domain with redirect capability |
Method 1: Velo Backend (Recommended)
Use Wix Velo to create a backend HTTP function that serves your UCP profile.
- Open your Wix site in the Editor
- Click Dev Mode in the top menu
- Click Turn on Dev Mode
- In the Site Structure panel, expand Backend
- Create a new file:
http-functions.js - Add the following code:
// Backend/http-functions.js import { ok, serverError } from 'wix-http-functions'; // This creates the endpoint: /_functions/ucp export function get_ucp(request) { const profile = { profile_version: "1.0", merchant: { name: "Your Store Name", url: "https://www.yoursite.com", description: "Your store description", contact: { email: "support@yourstore.com" } }, capabilities: ["browse", "search"], policies: { returns_url: "https://www.yoursite.com/returns-policy", shipping_url: "https://www.yoursite.com/shipping-policy", privacy_url: "https://www.yoursite.com/privacy-policy" } }; const options = { headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*" }, body: JSON.stringify(profile, null, 2) }; return ok(options); }
Create a new file routers.js in the Backend folder:
// Backend/routers.js import { ok, WixRouterSitemapEntry } from 'wix-router'; export function wellknown_Router(request) { if (request.path[0] === 'ucp') { // Redirect to HTTP function return ok('ucp-page', {}); } }
- In the Wix Editor, go to Site Menu โ Add Page
- Choose Router Page
- Set prefix to
.well-known - Connect it to your router
.well-known paths. If you encounter issues, use the External Hosting method below.
Click Publish to make your changes live. Your UCP profile will be available at:
https://yoursite.com/_functions/ucp(HTTP function)https://yoursite.com/.well-known/ucp(if router works)
Method 2: External Hosting with Redirect
If Velo isn't available or the router doesn't work, host your UCP profile externally and redirect.
Upload your UCP JSON file to a service like:
- GitHub Gist (get the raw URL)
- JSONBin.io
- Your own server or CDN
If you're using a custom domain with Wix, you can set up a redirect at the DNS level or use Cloudflare Workers:
// Cloudflare Worker example addEventListener('fetch', event => { event.respondWith(handleRequest(event.request)) }) async function handleRequest(request) { const url = new URL(request.url) if (url.pathname === '/.well-known/ucp') { const ucpUrl = 'https://your-hosted-ucp-url.com/ucp.json' const response = await fetch(ucpUrl) return new Response(response.body, { headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' } }) } return fetch(request) }
Schema.org Markup
Wix Stores automatically adds basic Schema.org markup to product pages. For enhanced AI compatibility:
- Go to your site's SEO Settings
- Navigate to SEO Tools โ Structured Data
- Ensure Product schema is enabled
Validate Your Implementation
Common Issues & Solutions
| Issue | Solution |
|---|---|
| Router prefix not working | Use the HTTP function method or external hosting |
| CORS errors | Ensure Access-Control-Allow-Origin header is set |
| Dev Mode not available | Upgrade to a Wix plan that includes Velo |
| Changes not live | Make sure to click Publish after changes |
๐ค Test with AI Agents
Run AI Agent Simulation
Test how AI shopping agents will interact with your Wix store.
Open Simulator โ