---
title: "Discussion on \"How to Hide Your Backend VPS IP Behind Vercel Using Next.js Rewrites\" | Hashnode"
description: "Discussion on \"How to Hide Your Backend VPS IP Behind Vercel Using Next.js Rewrites\". A step-by-step guide to proxying API requests and securing your backend with custom secret headers."
url: "https://hashnode.com/posts/how-to-hide-your-backend-vps-ip-behind-vercel-using-nextjs-rewrites/6aba50cd893032de5487d5ff"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Hide Your Backend VPS IP Behind Vercel Using Next.js Rewrites](https://blog.zyvop.com/how-to-hide-your-backend-vps-ip-behind-vercel-using-nextjs-rewrites?utm_source=hashnode&utm_medium=feed)

A step-by-step guide to proxying API requests and securing your backend with custom secret headers.

Sep 28 · 4 min read · blog.zyvop.com  
Read the article

-   [#backend](https://hashnode.com/tag/backend)
-   [#nestjs](https://hashnode.com/tag/nestjs)
-   [#proxy](https://hashnode.com/tag/proxy)
-   [#security](https://hashnode.com/tag/security)
-   [#vercel](https://hashnode.com/tag/vercel)

## Written by

[ZyVOP](https://hashnode.com/@zyvop)

@zyvop · Delhi, India

  
[View profile](https://hashnode.com/@zyvop)

The Developer Publishing Hub

One platform to write, cross-post to Dev.to, Medium, WordPress, Hashnode, and Bluesky, and protect your SEO with canonical links. Zero paywalls and full content ownership.

## Responses 3

Markdown supported · ⌘↵ to post

[Michael Hairetis](https://hashnode.com/@michaelhairetis)

[Sep 28](https://hashnode.com/posts/how-to-hide-your-backend-vps-ip-behind-vercel-using-nextjs-rewrites/6aba50cd893032de5487d5ff/comment/6aba587368d1a61633a88a41)

can this be done with tailscale also?

[ZyVOP](https://hashnode.com/@zyvop)

[Sep 28](https://hashnode.com/posts/how-to-hide-your-backend-vps-ip-behind-vercel-using-nextjs-rewrites/6aba50cd893032de5487d5ff/comment/6aba587368d1a61633a88a41#reply-6aba59296c625c4a6f3df274)

Yes, Tailscale can work too, especially if you want the VPS completely private. Vercel can’t directly join a Tailnet though, so you’d need an extra proxy/relay layer.

[Julian Neagu](https://hashnode.com/@julianneagulab)

[Sep 30](https://hashnode.com/posts/how-to-hide-your-backend-vps-ip-behind-vercel-using-nextjs-rewrites/6aba50cd893032de5487d5ff/comment/6abce0a521ea1864b4c027b6)

The Tailscale question is interesting too. For small projects, I usually like keeping the setup as simple as possible before adding another moving part.
