How can I redirect old URLs to new ones?
-
We are trying to optimize our website for search engines and one of the things we have noticed that needs to be changed are the URLs. I know how to modify the URLs but have no idea how I can get the old redirected to the new ones using 301. We have some pages ranking pretty high on Google and we can't loose this traffic.
Our website is hosted on Plesk and it was coded using Cold Fusion. I do have access to the .htaccess file.
Any help would be highly appreciated.
-
Don't forget to escape your hyphens (all of them!) with backslashes:
^pvc-cosmetic-bag-1.html
You will need to escape them before white too:
---white
-
As this URL in particular had a .html extension I thought it was easier to just create a html file and redirect it, so this one is working. But I still would like to know if i had done anything wrong because it didn't work. As most of our URLs don't have a .html extension it would be helpful to create the redirects on .htaccess
-
I just created a .html file for one of the URLs that had this extension thought the system doesn't generate htmls and it worked! Now I need to find a solution to the URLs that don't have an extension...
-
Hi, thanks for your help. The problem with this is that I don't have access to individual pages, the system will load it from the database. I think a .htaccess redirect would be the best solution, the problem is that I don't really know how to do it and how to write a redirect that would work.
Best regards
-
I have tried it but still no luck, I might have done something wrong though.
I need to urgently redirect http://www.personal-products.co.uk/pvc-cosmetic-bag-1.html to http://personal-products.co.uk/resealable-cosmetic-bags---white (I will change this URL in the future too but need it working now...)
I have tried it like this:
RewriteRule ^pvc-cosmetic-bag-1.html /resealable-cosmetic-bags---white [R=301,L]
Is there anything wrong?
Thanks!
-
Hi
maybe this article can help: http://www.quackit.com/coldfusion/tutorial/coldfusion_redirect.cfm
In ColdFusion, redirects can be done via one of two methods. The method you use will depend on the reason for the redirect.
Temporary Redirects (cflocation)
This is the most commonly used of the two - you will probably find yourself using the cflocation tag often.
A temporary redirect is typically used when you need to redirect the user to another page based on some logical rule in your program. For example, straight after they submit a form, the browser might redirect to another page.
ColdFusion includes the cflocation tag for performing temporary redirects. This actually sends HTTP headers to the user's browser indicating a 302 status code, which means "Moved Temporarily".
<cflocation url="/new_location.cfm"></cflocation>
Permanent Redirects
A permanent redirect should be used when a page no longer exists.
Permanent redirects use the 301 HTTP status code, which means, "Moved Permanently". In ColdFusion, a permanent redirect can be achieved using the cfheader tag.
<cfheader statuscode="301" statustext="Moved Permanently"><cfheader name="Location" value="http://www.quackit.com/coldfusion/tutorial"><cfabort></cfabort></cfheader></cfheader>
In case you're thinking, "but users can't see the status code anyway", that's only partially true. The 301 status code can be very useful for search engines. They will actually take notice of your 301 status code and index the correct file.
-
You could try something like this:
RewriteRule ^overnight-toiletry-packs.html /toiletry-travel-bags [R=301,L]
You need to escape the hyphens and periods... and include the switches for the 301 and specify that it's the Last rule.
Let me know how that goes - certainly share some code if you still get stuck.
-John
-
Thanks for your help!
The example would be the same as the one above, do you know what is the best way to do it??
http://personal-products.co.uk/overnight-toiletry-packs.html -> our current url
we have optimized this page to "toiletry travel bags" so i want the url to look something like this:
-
Thanks.. I got that far, but I tried few different 301 redirects and it didn't work.
One example would be this:
http://personal-products.co.uk/overnight-toiletry-packs.html -> our current url
we have optimized this page to "toiletry travel bags" so i want the url to look something like this:
http://personal-products.co.uk/toiletry-travel-bags
I can change the URL manually but I need to create a 301 redirect. Do you have any idea how I can do it? As we use a coldfusion website, the pages don't actually exist, they are all on the database.
i had tried few methods I found on google but no luck =[
-
Hey Flavia-
Check out this article on htaccess magic
http://www.askapache.com/htaccess/list-of-methods-to-redirect-users-to-different-page.html
There is a section on 301 redirects that will get you started. If you want to share any specific examples I'd be happy to help you further.
-John
-
You can do 301 redirects from the old page to the new page using .htaccess..however I would suggest you test the impact by doing it for 1-2 urls first and see if it does indeed help. The reason I am suggesting this is because when you do 301 redirects or canonical urls which also act like 301s, there's a little bit of link juice loss from the old URL. S if you have lots of websites linking to that page, you may loose a little bit of that link juice. Again, you have to do more of a risk/reward analysis and see what makes sense.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
301 Domain Redirect And Old Domain to a New one including pages
Hi, I need to 301 an old domain to a new one (new website) I need to 301 the domain to a new page not the new domain direct for example www.olddomain.co.uk to www.newdomain.co.uk/pagenew Then I need to also 301 all the other pages on the old domain to the new one for example... www.oldmain.co.uk/oldpage to www.newdomain.co.uk/newpage Issue is I can do one or the other not both, I can get the other pages to redirect but then the main domain wont redirect to the correct new page. Or I can get the old domain to redirect but not the internal pages. Thanks
Technical SEO | | David-Sharpe0 -
Strange URL redirecting to my new site
Hi all, I recently relaunched a site on a brand new URL - www.boardwarehouse.co.uk. I've spent the last couple of weeks building some backlinks as well as developing a basic content strategy. We've started ranking for a few of our less competitive keywords which is great, however there's a strange site which either redirects or is mirroring our content. I'm at a complete loss as to what's causing this to happen and what i can do to stop it. On the attachment - my content is top and second. The fourth result is the offending site. Any help/ advice would be most helpful! Thanks in advance, Alick 0BSyNn6
Technical SEO | | Alick3000 -
Redirect old shop to new domain
I have an old Magento shop placed on a subdomain: http://webshop.teamout.dk/ Now I have created a new shop in another store system called ShopOrama on a new rootdomain: What is the best way to get all my already indexed sites from google to redirect to my new site with the new META title + description? I have tried the Magento > Catalog > URL Rewrite, but it contains over 500 redirects already and making custom redirects for all my sites will take a lot of time. Because of the old site being a subdomain I can't change address in GWT. I'm looking forward to your solutions
Technical SEO | | NicolaiTeglskov.dk0 -
Old domain still being crawled despite 301s to new domain
Hi there, We switched from the domain X.com to Y.com in late 2013 and for the most part, the transition was successful. We were able to 301 most of our content over without too much trouble. But when when I do a site:X.com in Google, I still see about 6240 URLs of X listed. But if you click on a link, you get 301d to Y. Maybe Google has not re-crawled those X pages to know of the 301 to Y, right? The home page of X.com is shown in the site:X.com results. But if I look at the cached version, the cached description will say :This is Google's cache of Y.com. It is a snapshot of the page as it appeared on July 31, 2014." So, Google has freshly crawled the page. It does know of the 301 to Y and is showing that page's content. But the X.com home page still shows up on site:X.com. How is the domain for X showing rather than Y when even Google's cache is showing the page content and URL for Y? There are some other similar examples. For instance, you would see a deep URL for X, but just looking at the <title>in the SERP, you can see it has crawled the Y equivalent. Clicking on the link gives you a 301 to the Y equivalent. The cached version of the deep URL to X also shows the content of Y.</p> <p>Any suggestions on how to fix this or if it's a problem. I'm concerned that some SEO equity is still being sequestered in the old domain.</p> <p>Thanks,</p> <p>Stephen</p></title>
Technical SEO | | fernandoRiveraZ1 -
Temporary Redirect - on nonexistant URL
I'm getting a Temporary Redirect issue on | http://www.luckygemstones.com/botswana-legends.htm http://www.luckygemstones.com/botswana-legends.htm | http://www.luckygemstones.com/page-not-found.htm | 1 | 0 | 302 | YET! There is no such page on my site. I believe I had one once, but has been corrected for a while now. WHY is SEOMOZ picking this up as an error and how can I fix? Kathleen http://www.luckygemstones.com
Technical SEO | | spkcp1110 -
Is Buying Domains Good For SEO? Can I 301 redirect domains to an Original website?
I have a friend that purchased multiple domains related to their website. Each of these domains have the back ground of the original website and irrelevant content on them. Is is possible to redirect the various domains to certain pages on the original website. For example if the website is www.shoes.com and they purchased domains such as www.leathermensshoes.com and a few others related to the website. Is it SEO friendly to link the domains purchased to the original website?
Technical SEO | | TSpike10 -
Can anyone tell me where my site can be improved
My website is www.theradiatorgallery.com I have been trying to get on 1st page for designer radiators. I am currently ranked 21st just dropped to the 3rd page within the past hour, i was 20th before this. There are some sites that i would think i would rank better than due do i have better on page optimization, higher PA, DA and PR based on seo moz reports. Is there something wrong with my site that i am missing? the sites i feel i should rank better than are; radsnrails.co.uk, warmrooms.co.uk and a couple others Any help would be great! Thanks Guys
Technical SEO | | myloseo0 -
Starting a new product, should we use new domain or subdomain
I'm working with a company that has a high page rank on it's main domain and is looking to launch a new business / product offering. They are evaluating either creating a subdomain or launching a brand new domain. In either case, their current site will link contextually to the new site. Is there one method that would be better for SEO than the other? The new business / product is related to the main offering, but may appeal to different / new customers. The new business / product does need it's own homepage and will have a different conversion funnel than the existing business.
Technical SEO | | gallantc0