---
original_url: "https://jace.pro/blog/custom-domain-for-pdis-using-vercel/"
format: markdown
ai_optimized: true
---

Custom Domain for PDIs using Vercel- # Custom Domain for PDIs using Vercel

February 6, 2021 [servicenow](/tags/servicenow/)

  Enable AI Animation# [Custom Domain for PDIs using Vercel](#custom-domain-for-pdis-using-vercel)

I was able to do this with the help of Mav and Mike Bahr. Thanks guys!

First of all this fixes the redirect issues from the Netlify version. Netlify appends a slash to some endpoints. I don’t see a way to control it, Vercel lets you control how that works.

# [Simple Vercel Proxy](#simple-vercel-proxy)

This is a simple repository.

It’s purpose it to create a proxy to a site you own.

## [How does it work?](#how-does-it-work)

You have a domain point to Vercel
- Vercel has a “redirect/rewrite” rule that doesn’t redirect instead proxies
- That’s it

## [What do I have to do?](#what-do-i-have-to-do)

- A GitHub account.
- **Access to your DNS** for the domain to create appropriate records.
- A **Vercel account**.

# [Ok, I’m ready!](#ok-im-ready)

## [Deploy the repo](#deploy-the-repo)

- [![Deploy with Vercel](/img/Yw3T1mn72S-650.jpeg)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fjacebenson%2Fdev)
- Login with GitHub, trust me.
- Enter a project name, I called mine `pdi-redirect`.
- Pick GitHub.
- Create the repository private or public, your choice.
- Leave the Import Project settings, they were auto-detected by Vercel, and “Deploy”.
- Now it’s building, it’ll take about 20 seconds to build.
- You should get a 🎉 **CONGRATULATIONS** 🎉 message. It should work now.
Well, it’s redirecting to my site. Let’s fix that.

## [Update the repo to point to your site](#update-the-repo-to-point-to-your-site)

- Go to your git source where that button created the repo.
- Update the `./_includes/layout/redirect.njk` file to the site you want.
- Vercel should trigger a build and update index.html and 404.html to redirect to your site.

## [Set up the domain](#set-up-the-domain)

- Now you need to set up the domain. To do that goto “Domains”,
- It’ll ask what project you want to use, pick the one you made from #1.
- It will show you, that your DNS is wrong. Go forth and set the dns as depicted.
- Comeback to Vercel’s domain page and “Refresh” your domain entry. You may need to wait for your DNS to propagate.
- That’s it.

---
[View this page on GitHub](https://github.com/jacebenson/jace.pro/tree/main/./src/posts/2021/2021-02-05-custom-domain-for-pdis-using-vercel.md).

[Custom Domain for PDIs using Vercel](https://jace.pro/blog/custom-domain-for-pdis-using-vercel/) [Jace Benson](https://jace.pro) ![Jace Benson](https://jace.pro/icon-512x512.png)

---

*This content is from Jace Benson's ServiceNow and tech blog at jace.pro*
*Original post: https://jace.pro/blog/custom-domain-for-pdis-using-vercel/*
