API Refrence for 301 Redirects

Would it be possible for you to provide an API endpoint to CRUD the 301 redirects?
We are going to run quite a few websites on webflow and this would safe us hours upon hours of work.

@Brando

There is a wishlist item you can vote for. Don’t hold your breath though.

https://wishlist.webflow.com/ideas/WEBFLOW-I-775

Wow, that’s already three years ago.

1 Like

And it should be an easy job as they already have an endpoint for it. The admin panel uses it but it’s not in the public API…

For anyone still wondering how to do this, I made a simple javascript hack that works. I was using Chrome developers tools console for this. Just copy/paste this code in to the console on the hosting tab in Webflow dashboard (and of course change the URLs):

var hostingContainer = document.getElementsByClassName('hosting-tab')[0];
var hostingController = angular.element(hostingContainer);
var scope = hostingController.scope();

var redirects = [
  {source: '/old1', target: '/new1'},
  {source: '/old2', target: '/new2'},
  {source: '/old3', target: '/new3'},
  {source: '/old4', target: '/new4'},
];

redirects.forEach(function (rule) {
  scope.redirectPath = rule.source;
  scope.redirectTarget = rule.target;
  scope.addRedirect();
});
2 Likes

Thank you Jannekanerva for input, I’m looking for a pure API reference to integrate it against an internal self-built solution, I guess I could mock up the hosting tab programmatically and then run the script, but seems like quite the workaround instead of just webflow putting in the few hours to add this feature.

And on that note, a question regarding workflows regarding webflow, I see Facebook ads mocking the complexity of coding and just making really weird statements of how workflows and code generally are handled/worked with.

Why aren’t quick features just implemented to satisfy a vast majority of your community, with such little effort as a one-person one day task, just adding all the small tasks to next sprint and have them implemented in a few weeks?

It’s not to come off rude, but it feels like either their developer team is either really really small, or there’s a lack of actual backend competence, and if your maintaining such a big product, maybe its time to just add a little focus on the “small task big impact things”

*CRUD 301. (1 day?)
*Add a service working and a manifest.json to the root of each website, adding a toggle together with the minify options. (Shouldn’t take more than a day)
*Add compression on the Jquery CDN they use. (1-hour fix max)
*Add the ability to create read-only keys to the API reference, instead of just a full master CRUD key, you can’t expose it, Making it unable to custom DB requests without building an entire service wrapping it all? 0.o… (Shouldn’t take more than 2 days including the complexity of the system in place)

The compression on the jquery is baseline insane that it’s not just ripped into the current sprint, such an easy fix that would save million of MBs daily across all their customer’s websites.

Come on Webflow! When will some updates be done to include wishlist items such as this?

Doesn’t seem to work anymore.

Was there any progress on this?

@cataleen @Joachim_B

For straight up imports, you can use Finsweet’s browser extension to do CSV imports.

If you need full CRUD support, the v2 API doesn’t appear to support anything.
I’d simply front it with something like Cloudflare and use Cloudflare’s API to manage the redirects.