Clean URL help!
-
Hi all,
In short, i'm looking to redirect examplepage.html to examplepage .I've got rid of the .html, sitewide this morning. However I want to redirect Google & people who have bookmarked the old url structure.
Currently if you have the extension on or not, it will show in your browser.
I'm wanting /examplepage.html to 301 redirect to /examplepage
I've gone the normal way I'd do it by adding in .htaccess:
Redirect 301 /examplepage.html http://www.example.com/examplepage
I'm assuming it isn't redirecting as the example.html page is no longer... what is the way around this?
Thanks for any help!
In firefox the error of the page is:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
-
Hi,
I've found a solution, however thought i'd share.
Within the .htaccess file, i've added
# 301 permanent redirect all .html to non .html
RewriteCond%{THE_REQUEST} \.html RewriteRule^(.*)\.html$ /$1 [R=301,L]
Thanks
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
-
URL no longer ranks after redesign, everything was done by the book. Can someone plz help?
Hey Mozzers, After a redesign of our site we have a huge problem with 1 particular URL. We can't understand what is wrong with it. Our site was redesigned about 3 weeks ago everything was done to make sure the process was smooth. Content on the new url was exactly the same as before, title tags and meta descriptions were copy pasted, 301 redirects were set up. Our site has 47 pages and all other pages are still ranking the same way as they used to before the update but this one url has just dropped from serps or once a while is appearing on 2nd, 3rd pages. URL in question is: https://dcacar.com/dulles-limo-service/ We are a MOZ pro client and have the data on where this url was ranking prior to the update. Keywords it ranked for #1position on page one- some examples ( car service to dulles, car service to iad, dulles airport limo service) and many more. The only thing that has changed was the url the old url was https://www.dcacar.com/dulles-limo-service.html After the new design we got rid of the ".html" on all our urls, the funny thing is that all our 46 urls were updated the same way but only this url is experiencing this problem. Google search console shows that url is indexed and on Google but sometimes it does not show up on serps. Can anyone please help? 20% of our business comes from this url and we are loosing real money everyday and I can't figure out was is wrong with it. Thanks all, Davit
Intermediate & Advanced SEO | | Davit19850 -
Link juice through URL parameters
Hi guys, hope you had a fantastic bank holiday weekend. Quick question re URL parameters, I understand that links which pass through an affiliate URL parameter aren't taken into consideration when passing link juice through one site to another. However, when a link contains a tracking URL parameter (let's say gclid=), does link juice get passed through? We have a number of external links pointing to our main site, however, they are linking directly to a unique tracking parameter. I'm just curious to know about this. Thanks, Brett
Intermediate & Advanced SEO | | Brett-S0 -
How to deal with URLs and tabbed content
Hi All, We're currently redesigning a website for a new home developer and we're trying to figure out the best way to deal with tabbed content in the URL structure. The design of the site at the moment will have a page for a development and within that you can select your house type, then when on the house type page there will be tabs displayed for the user to see things like the plot map, availability and pricing, specifications, etc. The way our development team are looking at handling this is for the URL to use a hashtag or a query string at the end of it so we can still land users on these specific tabs for PPC for example. My question is really, has anyone had any experience with this? Any recommendations on how to best display the urls for SEO? Thanks
Intermediate & Advanced SEO | | J_Sinclair0 -
URLs are not indexed
My website has 0.5 million pages with urls like this- **http://www.mycity4kids.com/Delhi-NCR/collage-painting-classes-%3cnear%3e-shalimar-bagh ****, **none of these urls are indexed. Question 1- What can be the possible reason for this issue? Users see this url as : http://www.mycity4kids.com/Delhi-NCR/collage-painting-classes-<near>-shalimar-bagh</near>
Intermediate & Advanced SEO | | prsntsnh
The symbol "<" and ">" get converted into "%3c" and "%3e" respectively, is this the reason for these urls not getting indexed?0 -
Multilingual and Multiregional SEO URL Structure
Hello 2 questions: I have a client that has country specific TLDs and has pages for each city and wants to target languages. What's the best practice? or does the order not matter? www.domain.ca/fr-ca/toronto www.domain.ca/toronto/fr-ca 2. This client currently has the following URL structure, is this not SEO friendly? does it matter to have Canada repeated? www.domain.ca/canada/fr-ca/toronto Thanks!
Intermediate & Advanced SEO | | nrv0 -
Help!!! Am I being Attacked???
Hello, I do not believe so much in spammy links attacks and I definitely do not believe my site is worth attacking. However, I'm seeing new links pointing to my site that I have no idea where they come from. I just spotted three articles on a poor crappy article site with exact match keywords point to me. The articles are completely unique (copyscaped them) and they were posted according to the site time stamp during Oct and Nov 2012. (And they Appear in the WMT recently discovered links from more or less the same time). What to do (besides for disavowing this domain)? Thanks
Intermediate & Advanced SEO | | BeytzNet0 -
Google News URL Structure
Hi there folks I am looking for some guidance on Google News URLs. We are restructuring the site. A main traffic driver will be the traffic we get from Google News. Most large publishers use: www.site.com/news/12345/this-is-the-title/ Others use www.example.com/news/celebrity/12345/this-is-the-title/ etc. www.example.com/news/celebrity-news/12345/this-is-the-title/ www.example.com/celebrity-news/12345/this-is-the-title/ (Celebrity is a channel on Google News so should we try and follow that format?) www.example.com/news/celebrity-news/this-is-the-title/12345/ www.example.com/news/celebrity-news/this-is-the-title-12345/ (unique ID no at the end and part of the title URL) www.example.com/news/celebrity-news/celebrity-name/this-is-the-title-12345/ Others include the date. So as you can see there are so many combinations and there doesnt seem to be any unity across news sites for this format. Have you any advice on how to structure these URLs? Particularly if we want to been seen as an authority on the following topics: fashion, hair, beauty, and celebrity news - in particular "celebrity name" So should the celebrity news section be www.example.com/news/celebrity-news/celebrity-name/this-is-the-title-12345/ or what? This is for a completely new site build. Thanks Barry
Intermediate & Advanced SEO | | Deepti_C0 -
How do I make my URLs SEO friendly?
Hi all, I am aware that overly-dynamic URLs hurt a website's SEO potential and I want to fix mine. At present they look like this: http://www.societyboardshop.co.uk/products.php?brand=Girl+Skateboards&BrandID=153 What do I need to do to fix them please... do I add some code to the htaccess file? Many thanks, much apreciated. Paul.
Intermediate & Advanced SEO | | Paul530