Point the sitemap, robots.txt and canonical links at the live domain
The www subdomain still serves the old site, so canonical and hreflang URLs now use aigrowthtechnologies.com (overridable with SITE_URL). The sitemap also lists lastmod and changefreq.
This commit is contained in:
@@ -18,6 +18,7 @@ Copy `.env.example` to `.env.production` (or `.env.local` for development) and f
|
||||
| `RESEND_API_KEY` | yes | Resend key with sending access to `aigrowthtechnologies.com`. Without it the contact form shows an error. |
|
||||
| `CONTACT_FROM` | yes | Sender, on the domain verified in Resend: `AI Growth Website <hello@aigrowthtechnologies.com>` |
|
||||
| `CONTACT_TO` | no | Inbox that receives enquiries; separate several with commas. Defaults to `rey@aigrowth360.io`. |
|
||||
| `SITE_URL` | no | Public address used for canonical links, hreflang, `sitemap.xml` and `robots.txt`. Defaults to `https://aigrowthtechnologies.com`. |
|
||||
| `CAPTCHA_SECRET` | no | Signs the contact form's "I'm not a robot" challenges (a self-hosted proof of work, no third-party account). Without it a random secret is used per process, which only matters across restarts. |
|
||||
|
||||
## Deploying to a VPS
|
||||
|
||||
@@ -13,10 +13,13 @@ export default function sitemap(): MetadataRoute.Sitemap {
|
||||
...industryNav.map((s) => `/industries/${s.slug}`),
|
||||
];
|
||||
const url = (p: string) => SITE_URL + (p === "/" ? "" : p);
|
||||
const lastModified = new Date();
|
||||
|
||||
return locales.flatMap((locale) =>
|
||||
paths.map((p) => ({
|
||||
url: url(localize(p, locale)),
|
||||
lastModified,
|
||||
changeFrequency: "monthly" as const,
|
||||
priority: p === "/" ? 1 : p.split("/").length === 2 ? 0.8 : 0.6,
|
||||
alternates: { languages: Object.fromEntries(locales.map((l) => [l, url(localize(p, l))])) },
|
||||
})),
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
// Route map and navigation. Kept free of page content so client components can import it.
|
||||
|
||||
export const SITE_URL = "https://www.aigrowthtechnologies.com";
|
||||
// The live address used in canonical URLs, hreflang links, the sitemap and robots.txt.
|
||||
// Override with SITE_URL if the site moves to another host (for example the www subdomain).
|
||||
export const SITE_URL = (process.env.SITE_URL || "https://aigrowthtechnologies.com").replace(/\/$/, "");
|
||||
export const CONTACT_EMAIL = "info@aigrowthtechnologies.com";
|
||||
|
||||
export const serviceNav = [
|
||||
|
||||
Reference in New Issue
Block a user