Custom 404 pages and router-level redirect logic with Wix Velo

Module 66: Wix Velo & Dev Mode: Advanced SEO for Developers | Lesson 674 of 687 | 28 min read

By Michael Andrews, Wix SEO Expert UK

A 404 error page is one of the most damaging SEO experiences on any website — it tells Googlebot and users that the content they expected is missing. Wix provides a default 404 page, but with Velo you can build a custom 404 experience that retains users and guides them toward relevant content, and you can implement router-level redirect logic to automatically send users from broken URLs to the correct destination. This lesson covers both capabilities.

The SEO Impact of 404 Errors on Wix Sites

404 errors are a normal part of the web, but a site with a large proportion of 404 errors signals poor maintenance to Google. Googlebot wastes crawl budget on 404 URLs, links pointing to 404 pages pass no authority, and users who hit a 404 page typically leave the site immediately (a signal Google interprets negatively). On Wix, common causes of 404 errors include changed page slugs, deleted pages, URL structure changes, and external links to outdated URLs.

Creating a Custom 404 Page in Wix

Setting up a custom 404 page that retains users

Implementing Redirect Logic with the Wix Velo Router

Wix Velo's router allows you to intercept URL requests before they are served and programmatically redirect them to different destinations. This is useful for handling predictable 404 patterns: for example, if you changed your URL structure from /services/SEO to /seo-services, you can write a router function that automatically redirects any request for the old pattern to the new URL with a 301 permanent redirect.

// Backend router file: routers.js
// Handles custom routing and redirect logic in Wix Velo
export function services_Router(request) {
  const path = request.path;

  // Redirect old /services/SEO pattern to new /seo-services URL
  if (path[0] === 'SEO' || path[0] === 'seo') {
    return redirect('/seo-services', 301);
  }

  // Redirect old /services/copywriting to new page
  if (path[0] === 'copywriting') {
    return redirect('/copywriting-services', 301);
  }

  // Default: render the services page
  return ok('services-page', { path });
}

function redirect(url, statusCode) {
  return { status: statusCode, redirectUrl: url };
}

Auditing 404 Errors on Your Wix Site

Prioritisation Strategy: Not all 404s are equal. Prioritise fixing 404s on pages that have inbound links from other websites (check in GSC under Links > External links). A page that other sites link to but that returns 404 is losing all the link equity from those external links. Redirect these URLs first to the most relevant live page on your site.

This lesson on Custom 404 pages and router-level redirect logic with Wix Velo is part of Module 66: Wix Velo & Dev Mode: Advanced SEO for Developers in The Most Comprehensive Complete Wix SEO Course in the World (2026 Edition). Created by Michael Andrews, the UK's No.1 Wix SEO Expert with 14 years of hands-on experience, 750+ completed Wix SEO projects and 425+ verified five-star reviews.