How to redirect an old link to new url

I’m recreating/redesigning my website (which was not created with Sparkle). In some cases for better layout/organization I want to place pages in folders (submenus), which was not previously the case. But that will change the url, adding the folder name before the page name. But there are already links out in the world to the original url. Is there a way within Sparkle to set up a redirect to the new page if someone clicks on an external link to the old page? Thanks.

Not so much in Sparkle @zim528, but you can do the following…

  • Design & create a 404 page with your sites navigation on it, and upload it to your hosting server
  • Permanent redirect (via the cPanel) the old URL onto the new URL


Contrary to FlaminFig’s opinion, I think it can be done with Sparkle’s on-board tools after all.

  • Keep the old page(name) and remove the content (which is now on the new page).
  • Add some text that the site has been redesigned.
  • Place the smartfield “Countdown” and set the action to “Go to page xyz” (the new page) when it expires.

This inflates your page a little bit concerning the number of pages, but it shouldn’t bother you too much.

Mr. F.

1 Like

Thanks. Just did a quick test and this seems to do what I need!

Well, maybe spoke too soon. Yes, I created the new page, and then on the old page (original URL) I replaced content with a message about page being moved, and used the countdown smart field, with an instruction to Go To A Page In This Website on expiration. I also gave the option to “click here” if you don’t want to wait for the countdown, and that has the same instruction when clicked, to go to the new page in my website. But after publishing, clicking on the link works, but waiting for the countdown opens a page that simply says Not Found. The url on the Not Found page is my main domain followed by a slash and some numbers and letters ending in .php?r=1 , not the url of the new page. Any thoughts?

Hello :wave:t2:

This error means that the page responsible for redirecting to the new page was not found on your server. You may have accidentally deleted it.
You can try republishing your site, and the missing page should be published along with it.

Another possibility is that your server does not support PHP. However, I don’t think that’s the case because servers usually don’t return a “not found” error in those situations.

1 Like

…Or you could try my suggestion @zim528 which will work outright?


That should not happen. Did you choose the new website (where the redirect points to) from the dropdown selection within the countdown settings?

Maybe you discovered a bug.

Mr. F.

Yes, that’s what I did. And as I noted, I give two options, wait for the countdown clock redirect (which leads to the Not Found message), or “click here” to be sent to the new page, which works. But both of those redirects are set up by choosing the “Go to a page in this website” pulldown, with both set up to send you to the exact same page.


I just did a test with V4.5.x. In preview it is working with the auto redirect when the countdown ends.
I did not upload the page, but i assume it will work live as well.

So, a bug slipped in this with version 5.

Mr. F.

I am still using V4.5! I hadn’t tested it with preview as you did, but just did so and it worked correctly. Yet when I copy the url of the source page and paste it into browser, the countdown still leads to the Not Found message!

I not sure if this work, but it’s a lot easier. I send a new site map with the new URLs to Google
What do you think of that solution?


There is another possibility: put your own pretty 404 error page on the website. There a link to the homepage - done. This will not immediately scare away a visitor who comes across a discarded page.

Examples of how this can look and how to do it are plentiful on the Internet and on Youtube.

Mr. F.

I’m running into the same problem.

I put together a redesign of the site a while back and changed around some of the structure. Google still points to a page that is no longer present, so if you go there from Google, you get an Error 500. I built a page that reads “This page has moved,” added the countdown timer as above, and selected the appropriate page in the “On Expiration” option. I then gave the page a custom filename so it shares the URL that Google is pointing to and hit publish.

That all worked great. But now when the Countdown expires, it redirects to a blank page that reads “Not Found” with a URL ending with “.php?r=1”

It works fine when I preview it from Sparkle. It just doesn’t work when published.

You can find the page with the redirect here: This Page Has Been Moved

A few obvious questions I know…

  • Does your server support PHP?
  • If you do you have close to the latest PHP installed on the server?
  • Have you tried completely removing your site from your server via FTP and then republishing your Sparkle website?

And is there an actual page on the server with that custom file name?

Hello @devilstx77 :wave:t2:

I also faced challenges with countdown-related redirections in one of my projects. The temporary solution I found was to delete and then reinstall a new countdown timer, which fixed the issue… until the site was published again. With each publication, the PHP page managing the redirection would get lost. So, I opted for a redirection using custom code through an embed.

However, in your case, as it involves changing URLs, I advise against using these kinds of redirections, as they won’t be good for your SEO. To do things properly, the first step is to go to the Google Search Console and request Google to re-index your site by providing the link to your sitemap:

I also suggest modifying the .htaccess file of your site (accessible via an FTP software), or creating it if it does not exist, and adding the following:

Redirect 301 /old-page.html /new-page.html
Redirect 301 /old-page2.html /new-page2.html

Be careful not to delete any existing code, and make sure everything works correctly after making this change. Depending on the server hosting your site, the code might not work, and you may need to adjust it.

This approach will not only make the redirection seamless for visitors but will also signal to search engines that the page has been permanently moved.

1 Like