Have you ever found yourself staring at a blank browser tab, wishing there was a way to generate a quirky, interesting, or downright ridiculous website at the click of a button? Welcome to the world of random website generators. These whimsical web tools serve no direct purpose other than entertainment and creativity, yet building one can be an excellent way to sharpen your web development skills. Leveraging modern frameworks like Next.js and deploying effortlessly with Vercel, crafting your own random website generator can be both a fun and educational project.
The Allure of Useless, Yet Entertaining Websites
Sometimes, the best projects stem from ideas that seem trivial. Take, for instance, websites like theuselessweb.com—millions have clicked just to be taken somewhere weird and wonderful. Though they may not solve life’s big problems, they do offer a break from the mundane and showcase the inventive potential of web development. Creating your own tool that spins up random websites can be a playful foray into the world of modern dev workflows while also providing opportunities for experimentation with design, APIs, and deployment strategies.
Meet Your Stack: Next.js + Vercel
To build such a nifty project, you’ll want a toolset that is both powerful and easy to use. That’s exactly where Next.js and Vercel shine. Together, they allow developers to spin up static and dynamic web applications with server-side rendering (SSR) out of the box, fast performance, and seamless deployments.
- Next.js is a React-based framework that supports things like routing, SSR, API endpoints, and more—all in one package.
- Vercel is the creators’ own deployment platform that provides incredible optimization, automatic CI/CD pipelines, previews, and easy HTTPS.
This stack is ideal for developers looking to turn silly ideas into serious learning experiences. Plus, with the simplicity of Vercel’s CLI or GitHub integrations, you can go from concept to live in minutes.
Conceptualizing Your Random Website Generator
Before delving into code, let’s outline what the tool should do. A good random website generator typically works like this:
- User clicks a button labeled something like “Take Me Somewhere Weird!”
- The application randomly chooses from a curated list of fun or odd websites.
- User is then redirected to one of those URLs, or it opens in a new tab.
If you’re feeling even more adventurous, you could build features like:
- Categorized websites (weird, funny, retro, art, etc.)
- A way for users to suggest new links
- Saving favorite sites
More than just button-click fun, this gives you the chance to explore REST APIs, state management, and maybe even database connectivity if the tool grows in functionality.

Structuring the Project
With Next.js, your folder structure will look something like this:
pages/
index.js
api/
random.js
components/
Header.js
RandomizerButton.js
data/
websites.js
Let’s break down these components:
- index.js: Your main landing page, featuring a fun design and the magic button.
- random.js: An API route that fetches a random URL from your database or list.
- Header.js: A reusable header component. You may want something colorful or glitchy for maximal effect.
- RandomizerButton.js: A dedicated component to handle the logic behind the button click and redirection.
- websites.js: A static array of URLs to be randomly pulled from, or a fetcher connecting to a CMS or database.
Writing the Randomizer API
In the simplest form, this is your backend logic delivered straight from Next.js’s built-in API routes. Here’s a basic idea for pages/api/random.js
:
export default function handler(req, res) {
const websites = [
'https://pointerpointer.com',
'https://heeeeeeeey.com',
'https://stonks.page',
'https://chickenonaraft.com',
'https://zoomquilt.org'
];
const randomIndex = Math.floor(Math.random() * websites.length);
const randomWebsite = websites[randomIndex];
res.status(200).json({ url: randomWebsite });
}
This tiny snippet selects a random URL and returns it to your frontend as JSON. The beauty of this lies in its expandability — swap the static array with a fetch to a NoSQL database or CMS to allow content management without modifying code.
The Frontend Experience
On your homepage, you’ll want to tee up the perfect moment: when your user clicks the button. Here’s how you might set that up in RandomizerButton.js
:
import { useState } from 'react';
const RandomizerButton = () => {
const [loading, setLoading] = useState(false);
const handleClick = async () => {
setLoading(true);
const res = await fetch('/api/random');
const data = await res.json();
window.open(data.url, '_blank');
setLoading(false);
};
return (
<button onClick={handleClick} disabled={loading}>
{loading ? 'Finding Something Weird...' : 'Take Me Somewhere Weird!'}
</button>
);
};
export default RandomizerButton;
This component manages everything from the fetch call to loading state and the actual redirection. It’s kept deliberately simple to make room for creative design.

Deploying with Vercel
This is where the magic really happens. Once your project is ready, deploying to Vercel is as easy as connecting a GitHub repo and hitting “Deploy.” Here’s the quick path to get it live:
- Push your code to a GitHub repository.
- Sign in to Vercel and import your GitHub project.
- Vercel will automatically detect Next.js and configure the build for you.
- Hit “Deploy” and within moments, your site is live with a custom URL.
Vercel also offers previews for each commit, custom domains, edge functions, and even analytics—making it ideal whether your website stays small or grows into a mega directory of the Internet’s quirkiest spots.
Tips for Making It Truly Fun
Since the purpose of a website like this is entertainment, don’t hold back on flair. Here are some ideas that can make your randomizer even more delightful:
- Add animations: Surprise users with glitch effects or CSS transitions.
- Introduce sounds: Play a silly tune when the button is clicked.
- Gamify it: Let users collect badges based on the number of sites visited.
- Enable sharing: Add social media share buttons for extra viral power.
Conclusion: A Silly Idea with Serious Potential
Random website generators are clearly fun, but building one is more than that—it’s a playground for web developers. You get to tap into API design, frontend dynamics, deployment workflows, and user interactions, all under the banner of something entertaining. With Next.js’s robust features and Vercel’s slick deployment, what starts as a joke can end as a polished product to showcase in your portfolio.
So go ahead—mix some creativity with code and bring strange corners of the Internet to curious people everywhere, one click at a time.