Home > http 301

How to fix a HTTP 301?

Published on April 12th, 2022

The HTTP 301 status code means that a page has been permanently moved to a new URL. This is often the case when a website changes domain names or migrates to a new server. When a browser sees a 301 error code, it should automatically redirect to the new URL.

People like you are also looking for:

  • http error code 301
  • http 301

1. Change the request method

In order to change the request method in order to fix http 301 redirect, the following steps must be followed:

  1. Navigate to the "Settings" tab of the website's admin panel.
  2. Under the "HTTP Redirects" heading, click on the "Set HTTP Method" button.
  3. On the "HTTP Method" page, select the "POST" option.
  4. In the "Request Method" field, enter "GET".
  5. Click on the "Update" button.
  6. The website should now be using the correct request method to fix http 301 redirects.

2. Change the request headers

  1. Navigate to the "Settings" panel in your WordPress site.
  2. Select "General" from the menu bar.
  3. Click on the "Headers" tab.
  4. Click on the "Add New" button.
  5. Enter the following information into the "Header Name" field: Access-Control-Allow-Origin: *
  6. Enter the following information into the "Header Value" field: Origin: http://localhost
  7. Click on the "Update" button.
  8. Click on the "Activate" button to save your changes.

3. Change the request body

The steps to change the request body in order to fix http 301 are as follows:

  1. Locate the HTTP header that was set when the request was made.
  2. Change the value of the header to 301.
  3. Reload the page.

4. Change the response headers

  1. Navigate to the Admin panel and click on "Response Headers".
  2. In the "Response Headers" panel, click on "Advanced".
  3. In the "Advanced Response Headers" panel, under "HTTP Status Code", click on "301".
  4. Under "Location", in the "Location" field, type "http://example.com/".
  5. Under "Content-Type", in the "Content-Type" field, type "text/html; charset=utf-8".
  6. Click on "Save Response Header".

5. Change the response body

  1. Navigate to the "Settings" tab on the website's administration panel.
  2. Click on "Web Server" in the left sidebar.
  3. Under "General Settings" on the right, scroll down to the "Response Body" section.
  4. Click on the "Edit…" button next to the "Response Body" field.
  5. In the "Edit Response Body" window that pops up, make the following changes:
  • Change the "Content-Type" field to "application/x-www-form-urlencoded"
  • Change the "Content-Length" field to the correct value (in this case, the value should be "40")
  • Change the "Content-Disposition" field to " attachment; filename=test.txt"
  1. Click on the "Save" button to apply the changes.
  2. Click on the "OK" button to close the "Edit Response Body" window.
  3. Click on the "Close" button to close the website's administration panel.