• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Preferred Domain Setting through RPC API

michael.gysin

New Pleskian
Hello
If a create a subscription on a plesk Server through the API don't know how to specify the preferred domain and it's always set to domain.tld. I would like to set it to none for all.

My xml request:

Code:
<packet version="1.6.3.0">
  <webspace>
	<add>
	  <gen_setup>
		<name>' + @Domain + '</name>
		<owner-id>' + CONVERT(varchar, @PleskCustomerID) + '</owner-id>
		<ip_address>' + @ServerSharedIP + '</ip_address>
	  </gen_setup>
	  <hosting>
		<vrt_hst>
		  <property>
			<name>ftp_login</name>
			<value>' + @Username + '</value>
		  </property>
		  <property>
			<name>ftp_password</name>
			<value>' + @Password + '</value>
		  </property>
		  <ip_address>' + @ServerSharedIP + '</ip_address>
		</vrt_hst>
	  </hosting>
	  <prefs>
		<www>0</www>
		
	  </prefs>
	  <plan-name>' + @Template + '</plan-name>
	</add>
  </webspace>
</packet>

If I add an alias i can set it with prefs/seo-redirect.

How can I set it on a domain? Any ideas?

Thanks
Michael
 
Hi Michael,
have you find the way to set se-redirect during create the new site?
I still searching for this item.
Ali
 
Hello
If a create a subscription on a plesk Server through the API don't know how to specify the preferred domain and it's always set to domain.tld. I would like to set it to none for all.

My xml request:

Code:
<packet version="1.6.3.0">
  <webspace>
	<add>
	  <gen_setup>
		<name>' + @Domain + '</name>
		<owner-id>' + CONVERT(varchar, @PleskCustomerID) + '</owner-id>
		<ip_address>' + @ServerSharedIP + '</ip_address>
	  </gen_setup>
	  <hosting>
		<vrt_hst>
		  <property>
			<name>ftp_login</name>
			<value>' + @Username + '</value>
		  </property>
		  <property>
			<name>ftp_password</name>
			<value>' + @Password + '</value>
		  </property>
		  <ip_address>' + @ServerSharedIP + '</ip_address>
		</vrt_hst>
	  </hosting>
	  <prefs>
		<www>0</www>
		
	  </prefs>
	  <plan-name>' + @Template + '</plan-name>
	</add>
  </webspace>
</packet>

If I add an alias i can set it with prefs/seo-redirect.

How can I set it on a domain? Any ideas?

Thanks
Michael

I am sure you figured out this by now but thought i would add it for the rest of the internet who may be looking.
In the <vrt_hst> section add a new property type.

<property>
<name>seo-redirect</name>
<value>www</value>
</property>
 
and in case you want to set the non-www domain as preferred, such as domain.tld (and not www.domain.tld), you have to use property non-www:
<property>
<name>seo-redirect</name>
<value>non-www</value>
</property>
 
Back
Top