One redirect rule not working

I have an old site that became part of another one during a rebuild.

I have added the _redirects file and all of them are being processed except one - -the root domain.

Deploy summary
3 new files uploaded

1 generated page and 2 assets changed.

54 redirect rules processed

All redirect rules deployed without errors.

No header rules processed

This deploy did not include any header rules. Learn more about headers.

All linked resources are secure

Congratulations! No insecure mixed content found in your files.

No edge functions deployed

This deploy did not include any edge functions. Learn more about Edge Functions.

Deploy log
Preview

9:44:18 AM: Starting post processing
9:44:18 AM: Post processing - HTML
9:44:18 AM: Post processing - header rules
9:44:18 AM: Post processing - redirect rules
9:44:19 AM: Post processing done
9:44:19 AM: Section completed: postprocessing
9:44:19 AM: Site is live :sparkles:

The site is guinea-fowl.com. Every page on the site redirects to the new page except https://guinea-fowl.com/

I have the / and /index.html in the redirects file.

Hi @neil0armitage, thanks for the post.
What web framework is your site built with?
Also if possible can you share a code snippet of your _redirects file for me to help with the debugging?

Thanks.

Hi, the site is built with Publii.
Here is the _redirects

Hi @neil0armitage, thanks for the feedback.
Since you want the root page / to redirect to https://cluckin.net/guinea-fowl-and-their-care.html, kindly remove the redirects on line 1 and 7 which begins with /index.html since it is repeated and incorrect.

The correct line for redirect from root page to https://cluckin.net/guinea-fowl-and-their-care.html is on line 2 which begins with /.

Redeploy again after the changes to see if it works.

Let me know the outcome.

Thanks.

I have updated the redirects file and the issue is still there. I have tried incognito in case it is a browser issue here.

Deploy summary
All files already uploaded

All files already uploaded by a previous deploy with the same commits.

51 redirect rules processed

All redirect rules deployed without errors.

No header rules processed

This deploy did not include any header rules. Learn more about headers.

All linked resources are secure

Congratulations! No insecure mixed content found in your files.

No edge functions deployed

This deploy did not include any edge functions. Learn more about Edge Functions.

Deploy log
Preview

1:41:49 PM: Starting post processing
1:41:50 PM: Post processing - HTML
1:41:50 PM: Post processing - header rules
1:41:50 PM: Post processing - redirect rules
1:41:50 PM: Post processing done
1:41:50 PM: Section completed: postprocessing
1:41:51 PM: Site is live :sparkles:

Hi @neil0armitage thanks for the feedback. Try and change the first line to the below to see if it works

http://guinea-fowl.com/ https://cluckin.net/guinea-fowl-and-their-care.html 301!
https://guinea-fowl.com/ https://cluckin.net/guinea-fowl-and-their-care.html 301!

Also kindly check the file to see if there are not repeated redirects.

Thanks.

1 Like

Brilliant, that has worked.

Many thanks

1 Like

HI @neil0armitage, you are welcome.
Glad to know the suggestions helped resolved your problem.