For my WordPress website, I use the plugin ‘Wp domain checker’. You can check if a domain is available and proceed with a redirect. The problem is that I want it to redirect to a special redirect depending on the page where the domain checker is embedded in. For example, if it is embeded in: and the redirect would be I want it to redirect to

With the plugin that I am using, you can add {domain} at the end to redirect to a special URL with the chosen domain at the end. I want this functionality, but then with the current URL instead of the chosen domain. I know that this works via an input text field, with the name=”domain”

Do I need to do this with PHP, or can I use the following JavaScript function, and how?:


And do I need to insert the code into the plugin PHP code, or in the current WordPress page?

Read more here: Redirect with current domain at the end – WordPress plugin


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: