百度智能云

All Product Document

          CDN

          Set the SEO Switch Attribute

          Interface

          This interface is used to set the SEO switch property.

          Method Path Description
          PUT /v2/domain/{domain}/config?seoSwitch Set seo switch property

          domain: Modify the configured CDN acceleration domain name.

          Request body

          Parameter Optional Type Description
          seoSwitch Required seoSwitch Set seo switch property

          The seoSwitch types are as follows:

          Parameter Optional Type Description
          diretlyOrigin Optional String ON means setting direct forward-to-origin, and OFF means the opposite.
          pushRecord Optional String ON means pushing access records to Baidu search, and OFF means the opposite.

          You can only take “ON|OFF” for diretlyOrigin and pushRecord.

          Response code (Http Status Code)

          HTTP Status Code Description
          200 Success
          400 Update failures, parameter errors, etc.

          Response body

          Parameter Type Description
          status String The status returned after it was just updated successfully is OPERATING.

          Request example

          PUT /v2/domain/myself.baidu.com/config?seoSwitch HTTP/1.1 
          Host: cdn.baidubce.com 
          Content-Length: 72
          Content-Type: text/json;utf-8
          { 
              "seoSwitch": {"diretlyOrigin": "ON","pushRecord" : "OFF"} 
          } 

          Response example

          Sample Response 
          HTTP/1.1 200 OK 
          Server: nginx/1.14.0 
          Date: Fri, 21 Sep 2018 03:46:35 GMT 
          Content-Type: application/json; charset=utf-8 
          Transfer-Encoding: chunked 
          Connection: keep-alive 
          X-Powered-By: PHP/5.6.36 
          x-bce-request-id: dd490e5d-64da-e2b-1cdd-fc98c864dfd
          
          {"status":"OPERATING"} 
          Previous
          Query HttpHeader
          Next
          Query the SEO Switch Attribute