URL redirect from one domain to another using cloudflare

I have been trying to set up a cloudflare worker to redirecet an URL to another (SOURCE.ie/… → DESTINATION.com/…). The destination URL is set up within cloudflare the source-URL however is purchased via Onlydomains. I have been using the code given in the documentation:

const base = "https://DESTINATION.com"
const statusCode = 301

async function handleRequest(request) {
  const url = new URL(request.url)
  const { pathname, search } = url

  const destinationURL = base + pathname + search

  return Response.redirect(destinationURL, statusCode)

addEventListener("fetch", async event => {

What I think have to do now is to aadd a route but is does not want to do that: [![](https://i.stack.imgur.com/JEBFD.png)](https://i.stack.imgur.com/JEBFD.png)

Although I added the nameservers to the Onlydomains URL.

Am I missing something? I just want a simple redirect that replaces SOURCE with DESTINATION :|