Halo, kalau kamu merasa tulisan saya ngebantu, kamu bisa ucapkan terima kasih lewat saweria .

If you feel this website help you, you can donate at saweria .



What I Used in This Tutorial

  1. Cloudflare free plan

How To

I try to move my main website (ipang.id) to ipang.my.id.

So from now, I need to redirect domain ipang.id to ipang.my.id, to make it recognizable by search engine.

But how to redirect domain with it path without nginx? For Cloudflare user, We can use “Redirect Rules” feature

  1. Create new CNAME/alias
Create New CNAME/Alias ipang.id as ipang.my.id

Create New CNAME/Alias ipang.id as ipang.my.id

If you got error **"An A, AAAA, or CNAME record with that host already exists"** that mean, you already have record for that domain/subdomain, remove it first then create new CNAME.
  1. Go to “Redirect Rules” menu, create new rule
Redirect Rules Menu Location

Redirect Rules Menu Location

New Redirect Rules. You Can Preserve Query String, If Your App Use Query String

New Redirect Rules. You Can Preserve Query String, If Your App Use Query String

www. to Non www Redirect Rules Example

www. to Non www Redirect Rules Example


Source:

  1. Cloudflare Community - Can I Use Redirect Rules To Remove Query Parameter From URL?