Logo
RavenSaaS Docs

SEO Optimization

SEO Overview

RavenSaaS has built-in comprehensive SEO optimization features, including multi-language support, sitemap generation, metadata configuration, etc., to help your website achieve better rankings in search engines.

Multi-language Content

Ensure that the website's multi-language content follows SEO best practices.

Configure Multi-language Content

Terminal
1i18n/messages/
2├── en.json     # 英文文案
3└── zh.json     # 中文文案

AI-Assisted Generation

Terminal
1update content of this file, for my new project "GAME AI", which is an AI Image Generator, with keywords "game ai, ai text generator"
AI 生成的多语言文案
AI 生成的多语言文案

Set Up Sitemap

Modify the public/sitemap.xml file to configure your own site information. You can use the xml-sitemaps website to generate it with one click. xml-sitemaps 网站一键生成。

sitemap.xml Configuration

Terminal
1<?xml version='1.0' encoding='utf-8' standalone='yes'?>
2<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3  <url>
4    <loc>https://ravensaas.io/</loc>
5    <lastmod>2024-12-24T10:00:00+00:00</lastmod>
6  </url>
7</urlset>

robots.txt Configuration

Modify the public/robots.txt content as needed:

Terminal
1User-agent: *
2Disallow: /*?*q=
3Disallow: /privacy-policy
4Disallow: /terms-of-service

Website SEO Audit

Use professional tools to check the website's SEO optimization status and ensure the website meets search engine optimization standards.

1. Download AITDK Plugin

Download the AITDK browser plugin AITDK 浏览器插件

2. Check Page Metadata

Check if the website homepage's title / description / Canonical are reasonable

AITDK 检查页面元数据
AITDK 检查页面元数据

3. Adjust Keyword Density

Use AI to assist in modifying the corresponding webpage content in json files under i18n/messages, adjusting the keyword density of the website's main keywords (around 3% is reasonable).

AITDK 检查页面元数据
AITDK 检查页面元数据

4. View Page Structure

RavenSaaS has optimized the content structure of the default landing page. If you have custom page components, you need to check if the page structure is reasonable.

AITDK 检查页面元数据
AITDK 检查页面元数据

5. SSR Detection

Enable SSR Check in the Issues panel of the AITDK plugin to detect whether the webpage is server-side rendered.

AITDK 检查页面元数据
AITDK 检查页面元数据

Metadata Configuration

If you have created new page routes (page.tsx), you can configure the Metadata information for the new pages. Setting independent title / description / canonical information for sub-pages is beneficial for SEO.

Page Metadata Configuration

app/[locale]/posts/page.tsx
1import { getTranslations } from "next-intl/server";
2
3export async function generateMetadata({
4  params: { locale },
5}: {
6  params: { locale: string };
7}) {
8  const t = await getTranslations();
9
10  let canonicalUrl = `${process.env.NEXT_PUBLIC_WEB_URL}/posts`;
11
12  if (locale !== "en") {
13    canonicalUrl = `${process.env.NEXT_PUBLIC_WEB_URL}/${locale}/posts`;
14  }
15
16  return {
17    title: t("blog.title"),
18    description: t("blog.description"),
19    alternates: {
20      canonical: canonicalUrl,
21    },
22  };
23}
页面元数据配置
页面元数据配置

GSC Integration

After the website goes live, add your site to Google Search Console to view the website's search traffic and ranking. Google Search Console 中添加你的站点,可以查看网站的搜索流量和排名情况。

GSC 添加站点
GSC 添加站点