Home WordPress 301 redirect loop issue
Reply: 0

WordPress 301 redirect loop issue

user1149
1#
user1149 Published in May 25, 2018, 11:11 am

I'm keeping an existing WordPress website but changing the domain name. The old domain name will be redirected to the same website, so if someone went to https://oldexample.com they would arrive at https://newexample.com.

From what I have read will need to do a 301 redirect from the old slugs to the new URLs, like this:

redirect 301 /old-page/ https://newexample.com/new-page

But in every article I've read online this approach assumes that the old slug is named something different to the slug.

But in my case, all of the pages have the same slug but will have a different domain. For example: A slug from the old domain might be my-cool-page and with the new domain there is also a page called my-cool-page, and according to what I've read I would need to do this:

redirect 301 /my-cool-page/ https://newexample.com/my-cool-page

But, and here is my question: Wouldn't this cause a redirect loop? Or can I simply get away with this:

redirect 301 https://oldexample.com/my-cool-page/ https://newexample.com/my-cool-page
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.303239 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO