307 Redirection to 301

mohamedhamid
Shopify Partner
2 0 0

Hi,

I would like to know how to configure HTTP redirection with code 301.

 

Currently, the redirection type is 307, which means when I navigated http://mysite.com,  I will be redirected to https//mysite.com with a code 307.

I would like to configure the redirection with code 301 which is more friendly to SEO.

In general, this can be handled at the .htaccess file, but in Shopify, that's not possible.

Anyone can help?
Thanks in advance.

Replies 2 (2)
NomtechSolution
Excursionist
1020 85 112

In Shopify, you cannot directly modify the .htaccess file to configure HTTP redirection. However, you can achieve a 301 redirection by using Shopify's built-in URL redirects feature. Here's how you can do it:

  1. In your Shopify admin, go to "Online Store" -> "Navigation".
  2. Scroll down to the "URL redirects" section and click on "Manage".
  3. Click on the "Add URL redirect" button.
  4. In the "Redirect from" field, enter the old URL that you want to redirect from (e.g., http://mysite.com).
  5. In the "Redirect to" field, enter the new URL that you want to redirect to (e.g., https://mysite.com).
  6. Set the "Redirect type" to "Permanent (301)".
  7. Click on the "Save" button to create the URL redirect.
Need a Shopify developer? Chat on WhatsApp: +923246370042
Hire us at noumanmasood64@gmail.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
mohamedhamid
Shopify Partner
2 0 0

Thanks for the help, but the idea you mentioned doesn't work in case I need to set the redirection for the homepage because Redirect from option only accepts subpages.
Screenshot 2023-05-30 at 15.13.44.png