How to add a forward rule


I need to add Forward rule :
301 forward
to: http: // www. example. com

to my domain added on Cloudflare

How do I proceed?

using Cloudflare api

:search: is always the best first step @manishnitk2011

What have you already tried? What doc were you referencing? What was the result?

1 Like

I have been assigned this task, but unaware of how to do it using Cloudflare api.

I have only added my domain to Cloudflare using create zone method in the api.

Following this link (as it looks suiting my requirement)

But don’t know what and where the values to provide to satisfy this requirement:

301 forward
to: http: // www. example. com

https: // developers.cloudflare. com/api/operations/page-rules-create-a-page-rule

This is the link I am intending to follow

Hi, Thanks

After some research into the topic now I am able to add the required page rule for my zone
But it is adding it with / at the like: *

How do I remove the ‘/’ at the end?