How to set the SEO redirect (Preferred domain) feature to be disabled by default

Created:

2016-11-16 13:05:47 UTC

Modified:

2017-04-24 11:57:54 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to set the SEO redirect (Preferred domain) feature to be disabled by default

Applicable to:

  • Plesk 11.5 for Windows
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

How to set Parallels Plesk's SEO redirect feature to be disabled ( Preferred domain value to "None") by default for new domains.

Cause

Currently, this option is not available. Feature request PPP-5274 has been created.

Resolution

As a workaround, an Event Handler can be created to set "Preferred domain" to "None" (SEO Redirect disabled), triggered by creating a domain with hosting.

For Windows

  1. Create an Event Handler triggered by physical hosting creation. Go to Tools & Settings > Event Manager > Add New Event Handler :

    Event: Physical hosting created
    Priority: lowest (0)
    User: Plesk Administrator
    Command: c:\\seo.bat <new_domain_name>
  2. Create an C:\\seo.bat file using Notepad and save following line in it:

    "%plesk_cli%\\subscription.exe" -u %1 -seo-redirect none

For Linux

  1. Create an Event Handler triggered when hosting settings are created. Go to Tools & Settings > Event Manager > Add New Event Handler :
    Event: Hosting settings created
    Priority: lowest (0)
    User: root
    Command: /usr/local/psa/bin/subscription -u <new_domain_name> -seo-redirect none

Related articles

To disable SEO redirection for domains that already exist, use this article:

Have more questions? Submit a request
Please sign in to leave a comment.