Skip to content

Instantly share code, notes, and snippets.

@ddpunk
Created January 7, 2026 11:38
Show Gist options
  • Select an option

  • Save ddpunk/e0c5287524053a639ce672f9561096a9 to your computer and use it in GitHub Desktop.

Select an option

Save ddpunk/e0c5287524053a639ce672f9561096a9 to your computer and use it in GitHub Desktop.

Jasne — pod Cloudflare zrobisz to najszybciej przez Bulk Redirects + kilka reguł priorytetowych.

Poniżej masz dokładnie co kliknąć i co wkleić (EN zawsze).


0) Założenia (ważne)

  • Źródło: binarapps.com i www.binarapps.com

  • Cel: zawsze https://binar.com/... (bez /pl)

  • Status: 301

  • Query string: zachowaj


1) Cloudflare → Bulk Redirects (najlepsze do migracji)

Krok 1: Utwórz listę redirectów

  1. Cloudflare → RulesBulk Redirects

  2. CreateBulk Redirect List

  3. Nazwa np. binarapps-to-binar

  4. Add Redirects → wklejasz CSV (poniżej)

Krok 2: Utwórz regułę Bulk Redirect

  1. Cloudflare → RulesBulk Redirects

  2. Create rule

  3. Choose list: binarapps-to-binar

  4. Status code: 301

  5. Preserve query string: ON

  6. Subpath matching: ON

  7. Save


2) Co wkleić (CSV) – priorytetowe redirecty “sensowne”

Wklej jako CSV (Cloudflare przyjmuje kolumny: Source URL,Target URL,Status Code):

Source URL,Target URL,Status Code
https://binarapps.com/,https://binar.com/,301
https://www.binarapps.com/,https://binar.com/,301

https://binarapps.com/contact/,https://binar.com/contact,301
https://www.binarapps.com/contact/,https://binar.com/contact,301

https://binarapps.com/privacy-policy/,https://binar.com/privacy,301
https://www.binarapps.com/privacy-policy/,https://binar.com/privacy,301

https://binarapps.com/cookies-policy/,https://binar.com/terms,301
https://www.binarapps.com/cookies-policy/,https://binar.com/terms,301

https://binarapps.com/services/,https://binar.com/services,301
https://www.binarapps.com/services/,https://binar.com/services,301

https://binarapps.com/consulting-services/,https://binar.com/expertise/regulatory-product-design,301
https://www.binarapps.com/consulting-services/,https://binar.com/expertise/regulatory-product-design,301

https://binarapps.com/fintech-development/,https://binar.com/expertise/open-banking,301
https://www.binarapps.com/fintech-development/,https://binar.com/expertise/open-banking,301

https://binarapps.com/ai-solutions/,https://binar.com/expertise/ai-agents,301
https://www.binarapps.com/ai-solutions/,https://binar.com/expertise/ai-agents,301

https://binarapps.com/cloud-solutions/,https://binar.com/expertise/payments-infrastructure,301
https://www.binarapps.com/cloud-solutions/,https://binar.com/expertise/payments-infrastructure,301

https://binarapps.com/our-technology/blockchain/,https://binar.com/expertise/defi-protocols,301
https://www.binarapps.com/our-technology/blockchain/,https://binar.com/expertise/defi-protocols,301

https://binarapps.com/blog/,https://binar.com/insights,301
https://www.binarapps.com/blog/,https://binar.com/insights,301

https://binarapps.com/client-stories/,https://binar.com/case-studies,301
https://www.binarapps.com/client-stories/,https://binar.com/case-studies,301

To są “money pages” i sekcje — one muszą być idealnie.


3) Masowe redirecty (wildcard) – zrobisz je przez Redirect Rules

Bulk Redirects nie zawsze jest najwygodniejsze do wildcardów, więc zrób je w Redirect Rules.

A) Redirect Rules: blog (wszystkie wpisy) → /insights

Cloudflare → RulesRedirect RulesCreate rule

Rule name: binarapps blog to insights
If: Hostname equals binarapps.com OR www.binarapps.com
AND URI Path starts with /blog/
Then: Static redirect (301) to:
https://binar.com/insights

✅ Włącz “Preserve query string”.

(Jeśli kiedyś przeniesiesz konkretne wpisy 1:1 na /insights/<slug>, to dodasz osobne redirecty “dokładne” w Bulk Redirects ponad tą regułą.)

B) Client stories (obie ścieżki) → /case-studies

Dwie reguły:

  1. URI Path starts with /client_stories/https://binar.com/case-studies (301)

  2. URI Path starts with /client-stories/https://binar.com/case-studies (301)

C) Kategorie WP → /insights

URI Path starts with /category/https://binar.com/insights (301)


4) Catch-all (ostatnia reguła) – wszystko inne 1:1 na binar.com

To jest najważniejsze, żeby nic nie zostało bez redirectu.

Cloudflare → Redirect RulesCreate rule

Rule name: binarapps catch-all to binar.com
If: Hostname equals binarapps.com OR www.binarapps.com
Then: Dynamic redirect (301) to:

https://binar.com${uri.path}

✅ Preserve query string: ON

Uwaga: ta reguła ma być na samym dole, bo inaczej “zje” Ci te lepsze mapowania.


5) Bonus: duplikaty “-copy” (opcjonalnie)

Jeśli chcesz od razu czyścić SEO syf:

  • Redirect Rule z regexem na końcówkę -copy i kierowanie na wersję bez -copy

Nie każdy plan CF ma regex w Redirect Rules tak, jak byś chciał — dlatego często prościej: zostawić to, a potem stopniowo dołożyć kilka najważniejszych “copy” jako exact w Bulk Redirects.


Checklista po wdrożeniu (5 minut)

  1. Otwórz parę starych linków z listy “all” i sprawdź czy:

    • jest 301

    • leci na sensowną sekcję (insights / case studies / services)

  2. W Google Search Console: dodaj binar.com i binarapps.com, wyślij nowe sitemap (/sitemap.xml na binar.com).

  3. Monitoruj 404 na binar.com i dopisuj brakujące mapowania (top 20 zawsze warto dopieścić 1:1).


Jeśli chcesz, w następnym kroku mogę Ci wygenerować pełny plik CSV z mapowaniem Twojej listy “all” (setki URL-i) do:

  • /insights (blog)

  • /case-studies (client stories)

  • /services / konkretne /expertise/* (najważniejsze landing pages)

Tylko wklej mi: czy chcesz zachować trailing slash na nowej domenie (np. /insights/) czy bez (u Ciebie wygląda na bez, więc domyślnie zrobię bez).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment