0019-00000001
The PutBucketWebsite request returned a MalformedXML error because the XML body is missing the WebsiteConfiguration root node.
Problem description
The XML body of the PutBucketWebsite request does not have a valid root node. OSS validates the request body against its published schema, and any structural mismatch returns MalformedXML.
Causes
The <WebsiteConfiguration> root node is absent from the XML body. Without this root node, the XML is not well-formed according to the OSS schema.
Examples
The following request is missing the <WebsiteConfiguration> root node:
PUT /?website HTTP/1.1
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Authorization: SignatureValue
<?xml version="1.0" encoding="UTF-8"?>
<IndexDocument>
<Suffix>index.html</Suffix>
</IndexDocument>
<ErrorDocument>
<Key>errorDocument.html</Key>
<HttpStatus>404</HttpStatus>
</ErrorDocument>OSS returns:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>MalformedXML</Code>
<Message>The XML you provided was not well-formed or did not validate against our published schema.</Message>
<RequestId>63D5E36B595B843930AD9B72</RequestId>
<HostId>zmf-dinary.oss-cn-hangzhou-zmf.aliyuncs.com</HostId>
<ErrorDetail>The root node is not named WebsiteConfiguration.</ErrorDetail>
<EC>0019-00000001</EC>
</Error>The <ErrorDetail> field — The root node is not named WebsiteConfiguration. — identifies the exact structural problem.
Solutions
Wrap all child elements inside a <WebsiteConfiguration> root node:
PUT /?website HTTP/1.1
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Authorization: SignatureValue
<?xml version="1.0" encoding="UTF-8"?>
<WebsiteConfiguration>
<IndexDocument>
<Suffix>index.html</Suffix>
</IndexDocument>
<ErrorDocument>
<Key>errorDocument.html</Key>
<HttpStatus>404</HttpStatus>
</ErrorDocument>
</WebsiteConfiguration>References
PutBucketWebsite — full request syntax and XML schema reference