homepage: make '/' the canonical route, 301 /home-page → /

Previous state: '/' was 307-redirected to '/home-page', and the
home-page route declared canonical='/home-page'. Net effect on
SEO: Google indexed '/home-page' as the canonical homepage and
treated '/' as a transient redirect (no link equity passed).

Changes:
- next.config.mjs: replace the source:'/' destination:'/home-page'
  temporary redirect with source:'/home-page' destination:'/'
  permanent (301). Any existing crawler entry for /home-page now
  consolidates onto '/'.
- src/app/page.tsx (new): re-exports default + metadata from
  ./home-page/page so '/' serves the homepage directly. No file
  moves required, no relative-import breakage in the home-page
  component subtree.
- src/app/home-page/page.tsx: canonical and openGraph.url
  '/home-page' → '/'. The page still builds at /home-page but
  the 301 above will redirect any hit before render.
- src/app/sitemap.ts: drop the duplicate /home-page entry — Google
  shouldn't be told about a URL that just redirects.
This commit is contained in:
Ryan Salazar
2026-05-21 17:37:45 +00:00
parent 78c2ee656e
commit 585a9503ab
4 changed files with 17 additions and 7 deletions

View File

@@ -50,11 +50,15 @@ const nextConfig = {
async redirects() { async redirects() {
return [ return [
// Root redirect // Homepage canonical: '/' is the real route now (src/app/page.tsx
// re-exports from src/app/home-page/page.tsx). The legacy
// /home-page URL gets a 301 permanent redirect to '/' so any
// crawler entry for /home-page consolidates link equity onto
// the canonical root.
{ {
source: '/', source: '/home-page',
destination: '/home-page', destination: '/',
permanent: false, permanent: true,
}, },
// WordPress admin redirects for broadcastbeat.com (301 permanent) // WordPress admin redirects for broadcastbeat.com (301 permanent)
{ {

View File

@@ -16,12 +16,12 @@ export const metadata: Metadata = {
title: 'Broadcast Beat — Broadcast Engineering News & Insights', title: 'Broadcast Beat — Broadcast Engineering News & Insights',
description: 'The digital platform for broadcast engineering professionals. Breaking news, deep-dive features, and industry spotlights from NAB to IBC and beyond.', description: 'The digital platform for broadcast engineering professionals. Breaking news, deep-dive features, and industry spotlights from NAB to IBC and beyond.',
alternates: { alternates: {
canonical: '/home-page', canonical: '/',
}, },
openGraph: { openGraph: {
title: 'Broadcast Beat — Broadcast News', title: 'Broadcast Beat — Broadcast News',
description: 'Breaking news and insights for broadcast engineering professionals.', description: 'Breaking news and insights for broadcast engineering professionals.',
url: '/home-page', url: '/',
type: 'website', type: 'website',
images: [ images: [
{ {

7
src/app/page.tsx Normal file
View File

@@ -0,0 +1,7 @@
// Canonical homepage at '/'.
// Content is defined in ./home-page/page.tsx (kept there to avoid
// breaking the relative imports its components depend on). The legacy
// /home-page URL still resolves but 301-redirects here via the
// next.config.mjs redirects() block.
export { default } from "./home-page/page";
export { metadata } from "./home-page/page";

View File

@@ -47,7 +47,6 @@ async function listEventSlugs(): Promise<{ slug: string; updated_at: string }[]>
export default async function sitemap(): Promise<MetadataRoute.Sitemap> { export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const staticPages: MetadataRoute.Sitemap = [ const staticPages: MetadataRoute.Sitemap = [
{ url: `${BASE_URL}/`, lastModified: new Date(), changeFrequency: 'daily', priority: 1.0 }, { url: `${BASE_URL}/`, lastModified: new Date(), changeFrequency: 'daily', priority: 1.0 },
{ url: `${BASE_URL}/home-page`, lastModified: new Date(), changeFrequency: 'daily', priority: 1.0 },
{ url: `${BASE_URL}/news`, lastModified: new Date(), changeFrequency: 'hourly', priority: 0.9 }, { url: `${BASE_URL}/news`, lastModified: new Date(), changeFrequency: 'hourly', priority: 0.9 },
{ url: `${BASE_URL}/gear`, lastModified: new Date(), changeFrequency: 'daily', priority: 0.8 }, { url: `${BASE_URL}/gear`, lastModified: new Date(), changeFrequency: 'daily', priority: 0.8 },
{ url: `${BASE_URL}/technology`, lastModified: new Date(), changeFrequency: 'daily', priority: 0.8 }, { url: `${BASE_URL}/technology`, lastModified: new Date(), changeFrequency: 'daily', priority: 0.8 },