Skip to Content

Set 301 Redirect In Odoo 18 - One at a time and bulk

Learn how to manual set a 301 redirect for a URL that has changed but has the same content. Also, bulk using spreadsheet.
December 3, 2024 by
Set 301 Redirect In Odoo 18 - One at a time and bulk
Serr.biz LLC, Michael Zittel
| No comments yet


In this video we learn how to set a 301 redirect from an OLD url to a new URL in Odoo 18 using the REDIRECT control panel.

To do so, we need to first set ACTIVATE developer mode found through the SETTINGS control panel.

After that, the REDIRECT control panel is available through the Website > Configuration menu.

How to set 301 redirect in Odoo

  • Toggle to DEVELOPER MODE
  • From the control panel navigate to the website
  • Under SETTING in the EDITOR tool bar, click REDIRECTS
  • Create new redirect
  • Enter OLD URL
  • Set to 301 redirect
  • Enter NEW URL
  • Save

Here's a link to the template referenced in the video

https://docs.google.com/spreadsheets/d/1X9-2rJFiuKPc1wycE_nbHv6LKywxxoBOdhI303w17i8/edit?usp=sharing

Watch the video for more details.

Transcript from the redirect video.

00;00;00;00 - 00;00;18;29


Hey, it's Mike with Serr.biz and today's Odoo. quick tip is using the redirect function within Odoo. The redirect function is where you have one URL and you want to change the name of it, and you have already done so. And


00;00;18;29 - 00;00;27;03


send traffic to, the new page. And we want to use it 301, is the status code.


00;00;27;06 - 00;00;38;25


It's a little geeky. I don't really want to go into it completely as far as what the geek aspects are. I just want to show you how to do it. It's important to do this.


00;00;39;04 - 00;00;54;08


Primarily, if the page content is the same and you've just changed the URL for whatever reason. So to get to the redirect control panel, you actually have to, first go to settings.


00;00;54;08 - 00;01;18;12


You have to scroll down to activate developer mode and just click that. And when you do, you'll see this little bug show up over there that lets you know that you're in developer mode. Then we go back to website.


00;01;18;14 - 00;01;44;23


And it redirects. And then we can just add a new redirect. So let's say you know old URL you got to put in the name. We're going to make this a permanent redirect. And the old URL was /old.HTML. And we want to redirect to /new.


00;01;44;23 - 00;01;56;17


So you've already created your page. There's no dot HTML. It's active and then sequence. Sequence is a little funny. Basically just leave it set at zero and then.


00;01;56;17 - 00;02;11;29


And now if somebody goes to old.HTML, they'll be redirected to /new. Let's see that in action. So let's go to.


00;02;12;01 - 00;02;38;21


Old.HTML. And you see it redirected. And we're on our new page. So that is how, it works. If you want to do it one at a time. If we want to do a bulk function and do that because a lot of sites, often when they're migrating, have a lot of pages that they need to move over, and sometimes they need to change the URL.


00;02;38;25 - 00;02;40;10


Editor mode. >


00;02;43;24 - 00;03;05;29


The first thing we need to do is, create a spreadsheet with everything. So here, let's see if we going to do it again. You have to have this sequence action name, URL, URL to, and then after you've already set it. We could just put in all of our URLs here. Yada yada yada.


00;03;06;01 - 00;03;38;19


Save this and then upload it. In this case we're using, Google Docs. What we would have to do is save as an Excel spreadsheet and. I'm saving this as the template and it's now saved. Then we would go to this little gear and then import records and upload data file. The one I just downloaded was Odoo 18 redirect templates.


00;03;38;22 - 00;03;59;29


And you see, it's showing us the mapping of, our column names to actual field names within Odoo. We test it first, and it's all good. And then we could just import it, and it would import everything and.


00;04;02;07 - 00;04;18;23


We could see it was called old-page.HTML. And if we do a quick search. There it is. So that's how you can do it manually. And that's how you can use a spreadsheet to do,


00;04;18;23 - 00;04;22;02


bulk upload of URLs. We want to redirect.


00;04;22;02 - 00;04;29;18


All right. That's it for today. If you have any questions, feel free to leave a comment and or reach out to us. My name is Mike with Serapis.


00;04;29;19 - 00;04;33;14


If you liked this video, like and subscribe and I'll see you next time.




Sign in to leave a comment