diff --git a/astro.config.mjs b/astro.config.mjs index b7ee0e9..45588e2 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -8,7 +8,7 @@ import path from 'path' const __dirname = path.dirname(fileURLToPath(import.meta.url)) export default defineConfig({ - site: 'https://dealplustech.co.th', + site: 'https://www.dealplustech.co.th', output: 'static', vite: { plugins: [tailwindcss()], diff --git a/nginx.conf b/nginx.conf index 542e30d..53f5b05 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,3 +1,14 @@ +# ===================================================================== +# non-www -> www (301) — canonical host is www.dealplustech.co.th +# ===================================================================== +server { + listen 80; + listen [::]:80; + server_name dealplustech.co.th; + + return 301 https://www.dealplustech.co.th$request_uri; +} + server { listen 80 default_server; listen [::]:80 default_server; diff --git a/public/robots.txt b/public/robots.txt index dad87f8..7980196 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -1,5 +1,5 @@ # robots.txt — ดีล พลัส เทค -# https://dealplustech.co.th +# https://www.dealplustech.co.th User-agent: * Allow: / @@ -35,7 +35,7 @@ User-agent: MJ12bot Disallow: / # Host (Yandex/Bing-style, also helps some other crawlers) -Host: https://dealplustech.co.th +Host: https://www.dealplustech.co.th # Sitemap -Sitemap: https://dealplustech.co.th/sitemap-index.xml +Sitemap: https://www.dealplustech.co.th/sitemap-index.xml diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 7908327..3af31d9 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -81,7 +81,7 @@ const fullTitle = hasBrandSuffix ? trimmed : `${trimmed} | ${BRAND}`; // Organization JSON-LD (rendered on every page so Google can verify the // publisher of the site). LocalBusiness subtype for Maps/3-pack SEO. -const siteUrl = 'https://dealplustech.co.th'; +const siteUrl = 'https://www.dealplustech.co.th'; const organizationSchema = { '@context': 'https://schema.org', '@type': 'LocalBusiness', diff --git a/src/pages/terms-and-conditions.astro b/src/pages/terms-and-conditions.astro index 7137c01..b473ce1 100644 --- a/src/pages/terms-and-conditions.astro +++ b/src/pages/terms-and-conditions.astro @@ -3,13 +3,13 @@ import BaseLayout from '@/layouts/BaseLayout.astro'; import { marked } from 'marked'; const termsContent = `**ชื่อเว็บไซต์:** ดีล พลัส เทค -**เว็บไซต์:** https://dealplustech.co.th +**เว็บไซต์:** https://www.dealplustech.co.th **มีผลบังคับใช้วันที่:** 6 พฤษภาคม 2569 **แก้ไขล่าสุด:** 6 พฤษภาคม 2569 ## 1. การยอมรับเงื่อนไข -ด้วยการเข้าถึงและใช้งานเว็บไซต์ https://dealplustech.co.th ("เว็บไซต์") ของบริษัท ดีล พลัส เทค จำกัด ("บริษัท") ท่านยอมรับและตกลงที่จะถูกผูกมัดด้วยข้อกำหนดการใช้งานฉบับนี้ +ด้วยการเข้าถึงและใช้งานเว็บไซต์ https://www.dealplustech.co.th ("เว็บไซต์") ของบริษัท ดีล พลัส เทค จำกัด ("บริษัท") ท่านยอมรับและตกลงที่จะถูกผูกมัดด้วยข้อกำหนดการใช้งานฉบับนี้ ## 2. บริการของเรา diff --git a/src/pages/บทความ/[slug].astro b/src/pages/บทความ/[slug].astro index e3d5040..0953c96 100644 --- a/src/pages/บทความ/[slug].astro +++ b/src/pages/บทความ/[slug].astro @@ -29,7 +29,7 @@ const tag = article.data.tags?.[0] ?? ''; // BlogPosting JSON-LD — provides rich result eligibility in Google // (article cards, author attribution, publish date). -const articleUrl = `https://dealplustech.co.th/${encodeURI('บทความ')}/${article.id}`; +const articleUrl = `https://www.dealplustech.co.th/${encodeURI('บทความ')}/${article.id}`; const blogPostingSchema = { '@context': 'https://schema.org', '@type': 'BlogPosting', @@ -39,21 +39,21 @@ const blogPostingSchema = { ...(article.data.featured_image && { image: /^https?:\/\//.test(article.data.featured_image) ? article.data.featured_image - : `https://dealplustech.co.th${article.data.featured_image}`, + : `https://www.dealplustech.co.th${article.data.featured_image}`, }), datePublished: article.data.published_at.toISOString(), dateModified: (article.data.updated_at ?? article.data.published_at).toISOString(), author: { '@type': 'Organization', name: article.data.author || 'ดีล พลัส เทค', - url: 'https://dealplustech.co.th', + url: 'https://www.dealplustech.co.th', }, publisher: { '@type': 'Organization', name: 'ดีล พลัส เทค', logo: { '@type': 'ImageObject', - url: 'https://dealplustech.co.th/images/logo/dealplustech-logo.png', + url: 'https://www.dealplustech.co.th/images/logo/dealplustech-logo.png', }, }, mainEntityOfPage: { @@ -149,11 +149,11 @@ const faqSchema = faqPairs.length >= 2 ? {