I am using Sitecore SXA and handling page not found through by default functionality in SXA by going on below path:

`/sitecore/content/{tenant name}/{sitename}/Settings` > Error handling tab > 
and add static page url under "Page Not Found Link" textbox. It is redirecting the page to page not found and working fine but URL is not changed to our custom static page(pagenotfound) in live site.

**For example :** If we type something wrong in url then it will redirect to page not found page. However url will remain. I would like to change its URL to "page not found" as well when we redirect to "page not found"

https://sitecore.com?dhfskhfspage

[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/0mRVN.png