• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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