# SEO

Cara Membina dan Menguji 301 Redirect Map yang Lengkap

Pelan laman desktop dan mudah alih bersama senarai semak pelancaran

Redirect map ialah migration source of truth: setiap known public URL menerima explicit, evidence-led decision sebelum launch. Ia mungkin “keep same URL pada 200,” “move permanently kepada genuine replacement,” “return real 404/410,” atau “hold untuk investigation”—dengan implementation dan test evidence direcord secara berasingan.

301 redirect map: jawapan ringkas

Redirect map ialah migration control record untuk setiap old public URL. Ia tidak bermaksud setiap row menerima 301. Setiap URL menerima evidence-based outcome: kekalkan alamat sama dan return 200, move permanently kepada genuine replacement, remain temporarily elsewhere, return real 404 atau 410, atau investigate sebelum launch. Map juga mesti record final destination, content dan metadata action, owner, test result dan post-launch evidence.

KeputusanHTTP outcomeBila ia betul
Kekalkan200Preferred public URL dan page purpose kekal valid
Pindah secara kekal301 / 308True replacement wujud di new URL
Pindah sementara302 / 307Source perlu kekal long-term preferred URL
Buang404 / 410Content sudah tiada dan tiada relevant replacement
Hold untuk investigationBelum releaseOwnership, replacement, traffic, link, policy atau status tidak jelas

Kenal pasti jenis migration dahulu

PerubahanAdakah public URL berubah?Peranan redirect map
Hosting atau CDN move sahajaTidakRecord status parity dan legacy redirect preservation; jangan invent URL move
CMS, framework atau design changeMungkinKeep existing path jika boleh; map genuine change sahaja
HTTP ke HTTPS atau hostname normalizationYa, ikut protocol atau hostGuna predictable rule dan verify setiap valuable path sampai same final resource
Path atau information-architecture changeYaCreate explicit old-to-new decision sebelum launch
Domain, subdomain, merge atau splitYaMap setiap important URL dan coordinate property, link, sitemap dan monitoring

Jangan combine domain move, new CMS, redesign, new content strategy dan unnecessary URL cleanup hanya kerana share launch date. Google recommend change satu major dimension pada satu masa jika practical. Separate change type jadikan failure lebih mudah diagnose dan rollback.

Freeze migration scope dan ownership

ControlKeputusan diperlukan
Launch boundaryDomain, subdomain, directory, locale, platform, asset dan environment included
Source-of-truth fileSatu controlled map, unique URL key, version, date, owner dan approval state
Change controlSiapa boleh add, edit, approve, implement, test atau rollback row
Release gateApa mesti complete sebelum redirect atau DNS changed
CommunicationSiapa receive launch notice, incident, decision dan evidence

Bina old-URL inventory daripada multiple source

SumberURL yang boleh direvealHad
CMS atau database exportPublished, draft, private, attachment, taxonomy, custom typeMungkin omit route daripada code, plugin atau server
XML sitemapURL yang previously declared untuk discovery dan indexingMungkin stale, incomplete atau include preferred URL sahaja
Full crawlLinked page, asset, status code, Canonical, metadata, alternateTidak boleh find unlinked atau inaccessible URL sendiri
Search ConsoleIndexed, crawled, linked, sitemap dan performance URLReport sampled, delayed, grouped dan bukan complete inventory
Analytics dan conversion systemVisited landing page, campaign, conversion dan historical journeyUntracked, blocked atau zero-visit URL akan absent
Server dan CDN logReal request daripada user, bot, app dan legacy linkRetention, bot verification, privacy dan access vary
Backlink dan mention toolLinked page, media, PDF dan old campaign URLSetiap provider ada different dan incomplete index
Ads, email, social, QR, app dan business profileDestination di luar organic-search inventorySelalunya owned oleh separate team dan account

Tiada single export ialah complete website. Merge source, preserve provenance dan investigate disagreement daripada biarkan latest crawl overwrite history.

Normalize URL tanpa hilang evidence

Normalization workflow
  • Store raw discovered URL exactly seperti found.
  • Parse scheme, host, port, path, query, fragment dan encoding separately.
  • Create normalized comparison key guna documented hostname, case, slash dan parameter rule.
  • Keep fragment untuk link QA walaupun tidak sent dalam HTTP request.
  • Jangan drop parameter sehingga function, traffic, link, campaign dan duplicate behavior understood.
  • Deduplicate selepas retain semua source, performance, backlink dan ownership evidence.

Guna decision-ready redirect-map schema

Field groupRequired column
IdentityUnique row ID, raw old URL, normalized old URL, source system, page type, locale
EvidenceCurrent status, indexability, canonical, traffic, conversion, backlink, internal link, owner
DecisionKeep, redirect, remove, merge, investigate; reason; approver; approval date
DestinationURL cadangan, status jangkaan, URL akhir, status destinasi, Canonical destinasi dan bukti relevan
Content dan SEOTajuk, description, H1, content, media, schema, hreflang, metadata, tarikh dan tindakan internal link
ImplementationRule owner, platform, pattern atau explicit rule, release, dependency, rollback
TestingFirst response, hop, final status, final canonical, body relevance, mobile, locale, test date, tester
MonitoringLaunch response, Google-selected canonical, click, error, log activity, incident, next review

Separate decision daripada implementation state

DimensiContoh valueKenapa separate
Approved outcomeKEEP, REDIRECT, REMOVE, HOLDRepresent business dan SEO decision
Implementation stateNOT_STARTED, BUILT, STAGED, LIVE, ROLLED_BACKShow apa actually happened
Test resultNOT_TESTED, PASS, FAIL, BLOCKEDPrevent “configured” mistaken sebagai “working”
Post-launch statusHEALTHY, WATCH, INCIDENT, RESOLVEDPreserve monitoring dan incident history

Prioritize risk tanpa delete long tail

Priority evidenceKenapa penting
Revenue, qualified lead atau assisted conversionProtect commercially useful journey
Cari click, impression dan indexed historyIdentify established organic entry point
Relevant external link dan referral trafficProtect discovery, trust dan visit daripada luar site
Navigation, internal link dan campaign dependenceReveal URL embedded dalam important journey
Legal, support, account, checkout atau product functionLow-traffic URL mungkin operationally critical
Unknown tetapi repeatedly requested legacy URLLog mungkin reveal value yang current report miss

Priority determine review order dan monitoring depth, bukan sama ada URL deserve decision. Setiap known public URL masih perlukan explicit outcome.

Keep valuable URL unchanged jika boleh

Redesign tidak require new slug. Jika audience task, preferred address, language dan ownership kekal valid, keep URL dan record 200 KEEP. Kemudian compare old dan new page melalui control dalam Canonical URL dan redirect dan SEO site architecture.

KEEP row masih perlukan parity check
  • HTTP status, indexability, preferred hostname dan self-Canonical.
  • Title, description, H1, primary content, media, date dan structured data.
  • Internal link, breadcrumb, pagination, related content dan navigation.
  • Hreflang, language switcher, Open Graph, feed, sitemap dan API reference.
  • Form, conversion, consent, analytics, ads dan third-party integration.

Guna permanent redirect hanya untuk genuine replacement

Replacement testSoalan
AudienceAdakah same visitor reasonably mahu destination?
Task dan intentAdakah ia complete same job atau nearest complete substitute?
Subject dan scopeAdakah ia cover essential topic, product, service, location atau policy?
Language dan marketAdakah ia appropriate untuk same locale dan commercial availability?
Evidence dan next actionBoleh user verify same claim dan continue journey?

Similar keyword sahaja tidak cukup. Record short relevance explanation dalam map supaya approver boleh challenge weak match sebelum code written.

Consolidate bila satu destination boleh own combined task

Consolidation patternSelamat apabilaTidak selamat apabila
Beberapa overlapping article ke satu guideGuide preserve useful question, evidence dan internal journeyTarget ialah generic category atau lose distinctive value
Old service page ke redesigned service ownerOffer, audience, location dan next action remain equivalentDifferent service forced ke broad overview
Legacy category ke maintained hubHub genuinely bantu user discover migrated resourceHub empty, noindex atau unrelated

Pilih permanent dan temporary status code secara deliberate

KodMeaning untuk migrationKegunaan
301Moved permanentlyPreferred server-side choice untuk most permanent URL move
308Moved permanently sambil preserve request methodUseful apabila platform behavior dan non-GET request require
302Found; temporary moveSource perlu remain long-term preferred URL
307Temporary move sambil preserve request methodTemporary routing apabila request-method handling matters

Google treat server-side 301 dan 308 sebagai permanent redirect signal. Guna temporary redirect hanya apabila source benar-benar remain intended long-term URL. Jangan switch code untuk chase assumed ranking advantage.

Guna real 404 atau 410 apabila tiada replacement

OutcomeSituasi betulUser experience
404 Not FoundResource unavailable dan tiada relevant replacementBranded helpful error page dengan real 404 status
410 GoneOwner intentionally remove resource dan mahu state ia goneClear explanation dan useful navigation dengan real 410 status
Relevant 301Replacement genuinely serve same user needImmediate arrival di final useful destination

Google recommend 404 atau 410 apabila content removed dan tiada similar replacement. Custom error design boleh contain useful navigation, tetapi server response masih mesti communicate failure. Friendly page yang return 200 ialah soft 404, bukan successful migration.

Jangan send setiap retired URL ke homepage

Old URLKeputusan lebih baik
Old Tentang Kami pageRedirect ke current Tentang Kami page jika true replacement
Discontinued product dengan direct successorRedirect jika successor genuinely satisfy same need; explain change
Expired event dengan evergreen event hubKeep archive atau redirect apabila hub preserve expected task
Removed article tanpa useful substituteReturn 404 atau 410, bukan irrelevant homepage redirect

Guna pattern apabila transformation terbukti konsisten

Rule typeSuitable caseControl
Exact one-to-one ruleHigh-value, exceptional, merged, renamed atau irregular URLExplicit source dan final target dalam map
Pattern ruleStable transformation seperti old host ke new host dengan unchanged pathEnumerate matched URL dan test exclusion sebelum release
Fallback ruleJarang justifiedJangan biarkan ia hide unmapped URL atau create homepage soft 404
Pattern-rule safety test
  • List semua known URL yang rule akan match.
  • List protected exception dan higher-priority exact rule.
  • Test encoded character, uppercase, trailing slash, parameter, file dan locale path.
  • Prove generated target wujud dan relevant untuk setiap matched source.
  • Prevent rule redirect destination kembali kepada dirinya sendiri.

Redirect direct kepada final destination

FailureContohPembetulan
ChainA → B → CA → C
Protocol dan host chainhttp → https → www → finalCombine normalization apabila platform safely support
LoopA → B → AFix rule precedence dan exclude final target
Redirect ke errorA → B (404)Repair atau pilih valid relevant destination
Redirect ke parameter variant yang redirect lagiA → B?x=1 → BPoint kepada final canonical URL kecuali parameter required

Googlebot boleh follow redirect chain, tetapi Google advise point kepada final destination secara direct dan keep unavoidable chain low. Setiap extra hop tambah latency dan satu lagi failure point untuk user, crawler, campaign, application dan analytics.

Handle protocol, host, port, slash, file dan parameter secara explicit

URL dimensionMigration decision
HTTP dan HTTPSChoose secure preferred version dan preserve certificate pada redirecting host
www dan non-wwwChoose satu public host dan send setiap path direct kepada equivalent
Default port dan staging hostKeep keluar daripada public Canonical, link, sitemap dan indexing
Trailing slash dan index.htmlChoose satu final convention; elakkan create chain untuk setiap request
Case dan encodingPreserve atau normalize ikut server behavior dan real URL ownership
Query parameterKeep required function dan campaign data; remove duplicate atau obsolete parameter dengan evidence
Image, PDF dan downloadMap important indexed atau linked asset kepada real replacement

Update semua canonicalization signal bersama

Destination signal alignment
  • Old URL return approved permanent redirect direct ke final URL.
  • Final URL return 200 dan bukan blocked atau noindex.
  • Final page ada self-referential Canonical guna preferred protocol, host, path dan locale.
  • Internal link, breadcrumb, navigation dan feed guna final URL.
  • Current sitemap list final indexable URL, bukan redirecting source.
  • Structured data, Open Graph, API reference dan campaign destination guna intended final URL.

Rebuild multilingual mapping sebagai complete cluster

Apabila mana-mana URL dalam language cluster berubah, update self-Canonical, reciprocal hreflang, language switcher, internal link dan sitemap alternate untuk setiap member. Jangan redirect Malay atau Chinese page ke English hanya sebab translation missed. Guna locale control dalam multilingual SEO untuk Malaysia.

Preserve content dan metadata, bukan address sahaja

LapisanCompare sebelum approval
Purpose dan visible contentAudience task, primary answer, service atau product scope, proof, FAQ, CTA
Cari presentationTitle, description, H1, image, publication dan modified date
Index controlStatus, robots, Canonical, hreflang, pagination, sitemap inclusion
Meaning dan entityStructured data, author, organization, product, service, location, identifier
Media dan fileImage URL, alt text, caption, video, PDF, download, ownership dan right
Journey dan measurementInternal link, form, WhatsApp, phone, checkout, consent, analytics dan event

Protect staging tanpa copy block ke production

Staging controlLaunch risk
Authentication atau network restrictionBoleh block external QA tool; production mesti tidak inherit
Noindex pada test pageMesti removed daripada indexable production template
Disallow dalam staging robots.txtRobots blocking prevent crawler melihat page-level noindex dan mesti tidak replace production rule
Temporary hostnameMesti tidak appear dalam Canonical, hreflang, structured data, feed atau sitemap selepas launch

Test dua view untuk setiap redirect

Test viewApa yang dibuktikan
Jangan follow redirectFirst response ada expected status dan Location header
Follow complete journeyDestination, hop count, final status, Canonical, language, content dan functionality correct
Automated row test
  • Request exact old URL tanpa automatically follow.
  • Compare actual first status dan Location dengan approved row.
  • Follow dengan bounded hop limit dan detect loop.
  • Confirm final URL, status, content type, locale, Canonical, robots dan meaningful body.
  • Store timestamp, environment, tester atau script version dan evidence.
  • Fail release untuk loop, unexpected chain, irrelevant destination, 5xx atau blocked critical page.

Run representative journey test, bukan status check sahaja

JourneyApa perlu verify
Cari landing pageOld result reach right final page, answer, language dan CTA
Navigation dan breadcrumbTiada link depend pada redirect dan hierarchy remain coherent
Form, WhatsApp, call, booking atau checkoutConversion works dan source/campaign/language context retained
Image, PDF, feed, app dan API consumerAsset resolve, content type correct dan client tidak break
404 dan removed contentReal error status, helpful interface, tiada accidental indexable soft 404

Pilih rollout strategy ikut risk dan size

SituasiPractical approach
Small atau medium site dengan one coordinated moveGoogle generally recommend move URL together selepas complete preparation
Very large site atau high operational riskPilot stable section, learn, kemudian rollout dalam controlled group
Hosting move tanpa visible URL changeFocus pada infrastructure parity, crawl access, capacity, TLS, DNS dan legacy redirect
Domain move plus redesign desiredSeparate change jika boleh supaya Cari dan incident signal interpretable

Guna Change of Address hanya untuk qualifying domain move

MoveGuna Search Console Change of Address?
example.com ke example.netYa, selepas redirect dan verification ready
a.example.com ke b.example.comYa, untuk verified domain/subdomain move
HTTP ke HTTPS sahajaTidak
www ke non-www pada same domainTidak
Move path dalam same domainTidak
Hosting atau CDN change tanpa public URL changeTidak

Verify relevant old dan new property dengan same account, preserve verification file atau tag, dan review manual action, removal, setting serta legacy control sebelum domain move. Tool supplement correct redirect; ia tidak replace redirect.

Guna controlled launch sequence

Launch order
  1. Freeze approved map, backup configuration dan content, serta name release owner.
  2. Deploy final page, asset, certificate, robots rule, analytics dan verification control.
  3. Remove staging-only noindex, access block dan temporary host daripada production output.
  4. Enable approved redirect dan immediately run automated old-URL list.
  5. Validate key journey, final Canonical, hreflang, structured data, internal link dan sitemap.
  6. Submit atau update sitemap; guna Change of Address hanya jika move qualify.
  7. Record release time, evidence, known exception dan rollback decision window.

Monitor old dan new URL selepas launch

WindowPrimary check
First minute dan hourAvailability, TLS, DNS, 5xx, loop, key redirect, form, analytics, robots, noindex
First daysFull mapped-list recrawl, log, 404/410, unexpected chain, sitemap processing, URL Inspection sample
First weeksOld-versus-new Search Console coverage dan performance, selected Canonical, traffic, conversion, backlink dan referral error
Following monthsSignal transfer, lingering old URL, seasonal comparison, content quality, redirect demand, domain dan certificate renewal

Temporary visibility fluctuation boleh berlaku semasa Google recrawl dan process move. Itu tidak justify ignore error atau promise recovery date. Segment ikut page group dan diagnose technical, content, demand, tracking serta business change separately.

Define incident trigger dan rollback boundary sebelum launch

Incident signalImmediate response
Critical page return 5xx, loop, block atau noindexStop release path, restore access atau last known good configuration dan retest
Large unmapped atau irrelevant redirect cohortDisable faulty rule, preserve exact exception, correct map dan redeploy
Tracking atau conversion failRestore customer path first; mark reporting gap dan avoid false performance conclusion
Google select unexpected CanonicalCompare status, content, internal link, sitemap, redirect, locale dan Canonical signal sebagai one system

Guna business-specific threshold berdasarkan normal error rate, traffic, conversion volume dan critical journey. Tiada universal percentage drop yang prove migration failed.

Keep redirect cukup lama dan maintain old infrastructure

Google recommend keep site-move redirect selama mungkin dan generally sekurang-kurangnya satu tahun supaya signal dan link boleh reassigned semasa URL recrawled. Dari user perspective, useful redirect mungkin deserve indefinite retention. Keep old domain, DNS, certificate dan redirect hosting operational selagi request masih arrive, dan update internal serta high-control external link untuk reduce dependence pada redirect.

Verified SEOWithJack migration example

SEOWithJack WordPress-to-static migration menggunakan 53-row status map, bukan blanket redirect rule. Current automated preservation audit verify 27 original article URL: 26 remain matched pada original path dan satu older SEO URL redirect permanently kepada consolidated beginner guide. Ia juga retain source Rank Math evidence, test 301, 404 dan 410 decision, serta keep production DNS outside migration step sehingga staging dan host check approved.

Verified controlCurrent evidence
Redirect-map row53
Original article URL preserved27
Original article path matched direct26
Original article consolidated melalui permanent redirect1
Production DNS changed oleh buildTidak

Compact row template yang boleh dicopy

Old URLKeputusanDestinationSebabExpectedActualOwner
/old-service/REDIRECT/services/current/Same service dan audience task301 → 200Pending testSEO + Dev
/useful-guide/KEEP/useful-guide/Stable preferred URL200Pending parity checkContent
/obsolete-no-replacement/REMOVETiada useful substitute410Pending testSEO
/unknown-legacy/HOLDPerlu log dan backlink reviewTiada releaseOpenOwner diperlukan

Final release gate

Jangan launch sehingga
  • Setiap known public old URL ada one approved outcome atau explicit blocked state.
  • Semua permanent redirect point direct kepada relevant final 200 URL.
  • Removed page return real 404 atau 410, bukan homepage atau soft-404 response.
  • Canonical, robots, hreflang, link, sitemap, schema, metadata, media dan conversion pass comparison.
  • Staging control tidak boleh leak ke production dan production host tidak leak ke staging evidence.
  • Automated list test dan representative user journey pass dalam release environment.
  • Monitoring, incident ownership, backup dan rollback decision ready.

Apa yang redirect map tidak boleh guarantee

Complete map tidak guarantee unchanged ranking, traffic, indexing speed, conversion rate atau fixed recovery date. Google process move per URL dan temporary fluctuation normal. Redirect ialah one canonicalization signal; content, internal link, crawl access, sitemap, site quality, demand, competition, platform behavior dan business operation masih matter. Responsible promise ialah controlled implementation, verified evidence, rapid diagnosis dan documented decision.

FAQ 301 redirect map

Adakah setiap old URL perlukan 301?

Tidak. Setiap known public URL perlukan decision, bukan semestinya redirect. Keep valid URL pada 200, redirect genuine move, return 404 atau 410 apabila tiada relevant replacement, dan hold unclear case untuk investigation.

Adakah 301 dan 308 kedua-duanya permanent?

Ya. Google treat kedua-duanya sebagai permanent redirect signal. 308 juga preserve request method. Choose ikut platform dan application requirement, bukan ranking myth.

Patutkah removed page redirect ke homepage?

Hanya dalam rare case homepage benar-benar replace same task. Google warn redirect banyak unrelated old URL ke one page boleh confuse user dan mungkin treated sebagai soft 404. Guna relevant replacement atau real 404/410.

Adakah 404 lebih teruk daripada irrelevant 301?

Tidak. Apabila tiada useful replacement, real 404 atau 410 ialah honest technical outcome. Irrelevant redirect damage user journey dan boleh interpreted sebagai soft 404.

Patutkah saya change URL semasa redesign?

Tidak kecuali existing address atau architecture ada genuine user, business, security atau maintenance problem. Preserve valid URL remove migration risk dan biarkan redesign focus pada experience.

Boleh create redirect dengan JavaScript?

Google boleh process sesetengah client-side redirect, tetapi recommend server-side permanent redirect jika possible. JavaScript tambah rendering dan failure dependency dan patut jadi fallback, bukan default migration method.

Berapa banyak redirect hop acceptable?

Design untuk satu: old URL direct ke final destination. Google boleh follow chain dan advise keep unavoidable chain low, tetapi crawler limit bukan performance target.

Berapa lama redirect perlu remain?

Google recommend keep site-move redirect selama mungkin dan generally sekurang-kurangnya satu tahun. Keep useful redirect lebih lama selagi people, bot, link, campaign atau application masih request old URL.

Bila perlu guna Search Console Change of Address?

Guna selepas redirect ready untuk qualifying move daripada one domain atau subdomain ke another. Jangan guna untuk HTTP-to-HTTPS, www normalization, same-domain path change atau hosting move dengan unchanged public URL.

Bagaimana tahu migration complete?

Tiada single instant. Confirm old request reach approved outcome, final page healthy dan selected appropriately, Search Console dan log show expected transfer, key journey convert, incident resolved dan redirect infrastructure maintained.

Rujukan rasmi

Merancang redesign atau migrasi?

Kongsikan laman lama dan struktur baharu sebelum URL berubah.

Bincangkan migrasi di WhatsApp

Jack Lee

Jack Lee

Building Cari Visibility with SEO, GEO & Laman Web Dibantu AI melalui projek dan eksperimen praktikal.