A Next.js application designed to handle domain redirections during domain changes between Vercel and other domain providers.
This project serves as a domain redirection service that helps manage the transition between different domain providers, specifically when migrating from or to Vercel. It provides a centralized solution for handling domain redirects during domain changes.
- Domain Redirection: Handle redirects between old and new domains
- Vercel Integration: Optimized for Vercel deployment
- Next.js 15: Built with the latest Next.js framework
- TypeScript: Full TypeScript support for type safety
- Tailwind CSS: Modern styling with Tailwind CSS v4
- Node.js 18+
- pnpm (recommended) or npm
- A Vercel account (for deployment)
-
Clone the repository:
git clone https://github.com/cobra91/migrate-domain.git cd migrate-domain -
Install dependencies:
pnpm install # or npm install -
Run the development server:
pnpm dev # or npm run dev -
Open your browser: Navigate to http://localhost:3000 to see the application.
migrate-domain/
├── app/ # Next.js App Router
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Home page
│ └── globals.css # Global styles
├── public/ # Static assets
├── package.json # Dependencies and scripts
├── next.config.ts # Next.js configuration
├── tsconfig.json # TypeScript configuration
└── README.md # This file
To configure domain redirects, you'll need to:
- Set up your domains in your domain provider
- Configure DNS records to point to your Vercel deployment
- Update the redirection logic in the application
-
Push to GitHub:
git add . git commit -m "Initial commit" git push origin master
-
Deploy on Vercel:
- Connect your GitHub repository to Vercel
- Vercel will automatically detect it's a Next.js project
- Configure your domain settings in Vercel dashboard
# Build the application
pnpm build
# Start the production server
pnpm start- Prepare the new domain in your domain provider
- Deploy this application to Vercel
- Configure DNS records to point to your Vercel deployment
- Update the redirection logic in the application
- Test the redirects to ensure they work correctly
- Update your main application to use the new domain
pnpm dev- Start development serverpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLint
- Create new components in the
app/directory - Add new pages following Next.js App Router conventions
- Update the redirection logic as needed
- Test thoroughly before deployment
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue if your problem isn't already listed
- Provide detailed information about your setup and the problem
Note: This project is specifically designed for domain migration scenarios. Make sure to test thoroughly in a staging environment before applying to production domains.