You can see a live preview of the application at SEO Next.js Starter Preview.
You can use this template to create your own project by clicking the button below:
The SEO Next.js Starter is designed to help developers quickly set up a robust and SEO-friendly web application using Next.js. This template provides a solid foundation for building applications that are optimized for search engines and performance.
- Server-side rendering for better SEO
- Static site generation for fast performance
- Dynamic routing for flexible navigation
- Built-in CSS and Sass support
- API routes for backend functionality
To get started with this template, follow these steps:
- Clone the repository.
- Install dependencies using
pnpm install
. - Create a
.env
file based on the provided.env.example
file and fill in your own values. - Optionally, you can edit the
src/config.ts
file directly to set your configuration values. - Run the development server with
pnpm dev
.
This template is designed for developers and teams looking to quickly set up SEO-friendly applications using Next.js. Here are some examples of projects and companies that utilize this template or similar setups:
- Toolbox Hub - Online Toolbox | Free & Useful Online Tools Collection
- Stair Calculator - Stair Calculator Pro: Precise Design & Construction Measurements
If you have created a project using this template and would like to share it, please submit your website link on the Submit Your Website issue.
You can configure your application using environment variables. The .env.example
file contains the following variables:
# replace with your own site name
NEXT_PUBLIC_SITE_NAME="SEO Next.js Starter"
# replace with your own title
NEXT_PUBLIC_TITLE="SEO Next.js Starter - A Starter Template for SEO Optimized Next.js Projects"
# replace with your own description
NEXT_PUBLIC_DESCRIPTION="A simple and easy-to-use starter template for building SEO optimized Next.js applications with best practices and performance in mind."
# replace with your own URL
NEXT_PUBLIC_URL="https://example.com"
# <optional> if you want to use Google Analytics
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID="your-google-analytics-id"
If you are deploying your application to Vercel, you can set environment variables directly in the Vercel dashboard. Follow these steps:
- Go to your Vercel dashboard and select your project.
- Navigate to the "Settings" tab.
- Scroll down to the "Environment Variables" section.
- Click on "Add" to create a new environment variable.
- Enter the variable name (e.g.,
NEXT_PUBLIC_SITE_NAME
) and its corresponding value. - Repeat this for all the environment variables you need to set.
- After adding the variables, redeploy your application to apply the changes.
For more information on configuring environment variables in Vercel, you can refer to the Vercel Environment Variables Documentation.
In Next.js, you can manage metadata using various conventions, including robots.ts
, sitemap.ts
, and layout metadata in layout.tsx
. This allows you to define how your application interacts with search engines and social media platforms. For more details, refer to the Next.js Metadata Documentation.
To optimize social media image generation, you can use the Vercel @vercel/og
library. This library allows you to create dynamic Open Graph images using HTML and CSS, which can enhance how your content appears on social media platforms. For more information, check the Open Graph Image Generation Documentation.
For more information on SEO best practices and guides, check out the Ahrefs SEO Guide.
You can easily deploy your application to Vercel with a single click. Click the button below to get started:
For more information, check the official Next.js documentation at nextjs.org/docs.
We welcome contributions! If you would like to contribute to this project, please follow the guidelines in the repository.
This project is licensed under the MIT License.