Redirect advice
-
My website has two versions of the homepage:
http://www.nile-cruises-4u.co.uk/http://www.nile-cruises-4u.co.uk/index.cfmI wondered if I could set up a 301 redirect in the .htaccess file so that only the http://www.nile-cruises-4u.co.uk page was returned as the homepage?Colin
-
Hi Colin,
Sorry for the spelling mistake the first response was off my phone. I have fixed the error (removed the s) in the above answer.
I added the same line to htaccess and you can try the redirection for yourself.
and attached my htaccess as a file for reference.
If you are still struggling I would do the following. Comment out all other code in htaccess temporarily if there is anything (comment by adding # at start of line) to isolate the issue. Ensure that there is no additional white space in the line. EG/ no additional spaces at end of line etc
If you still have no joy, consult your hosting company as they may block htaccess from functioning correctly.
Dan
-
Nope, unfortunately still not working.
Still get the same error message unfortunately.
Colin
-
Thanks Paul, I hadnt' noticed it.
I'll amend it now and give it another try.Thanks Paul and thanks Dan.
Colin
-
Colin, if you just copy and pasted the code Daniel provided, there is a typo in his spelling of your domain name - note the extra "s" at the end of the word "Nile".
If this is the code you're using, the redirect can't work because there is no such page to redirect to (the not redirecting to any url part of the error).
Did you include the typo in the .htaccess entry you created?
Paul
-
Hi Dan,
Thanks very much for that. I've added that to the .htaccess file but whenj I've checked both pages still show.
I checked again via http://www.webconfs.com/redirect-check.php and then I get this error message:
Either http://www.nile-cruises-4u.co.uk/index.cfm is NOT REDIRECTING to any URL or the redirect is NOT SEARCH ENGINE FRIENDLY
I wonder if I've missed something?
Colin
-
Hey Colin,
Highly recommend redirecting the index.cfm Page to /
The easiest way would be;
Redirect 301 /index.cfm http://www.nile-cruises-4u.co.uk/ Check out www.sitepoint.com/htaccess-for-all/ for more details on htaccess. Redirection like this prevents duplicate content, but also improves usability. NOTE: This has been edited to fix the issue highlighted below. Cheers Dan
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
-
Redirect Issue - Drop in ranking after CMS change
Hi Website - https://www.aasprint.com.au/ After we moved the site from wordpress to codeIgniter + angular there has been a huge drop in traffic and ranking. One of the thing we recently realized is the redirection - COULD THAT BE THE ISSUE? On the browser and sitemap the URL doesn't have "/" at the end When checked on redirection tool the URL seems to be redirecting to one with "/" at the end Attached are the screenshots. Also moz bar shows no redirection. However, the issue seems to be flagged by the site audit tool as 301 redirection. Not sure if it's the cause for the drop. What action to take? Any advice would be much appreciated. V7CNtqt j3dJ4TW
Intermediate & Advanced SEO | | Bhisshaun0 -
Would You Redirect a Page if the Parent Page was Redirected?
Hi everyone! Let's use this as an example URL: https://www.example.com/marvel/avengers/hulk/ We have done a 301 redirect for the "Avengers" page to another page on the site. Sibling pages of the "Hulk" page live off "marvel" now (ex: /marvel/thor/ and /marvel/iron-man/). Is there any benefit in doing a 301 for the "Hulk" page to live at /marvel/hulk/ like it's sibling pages? Is there any harm long-term in leaving the "Hulk" page under a permanently redirected page? Thank you! Matt
Intermediate & Advanced SEO | | amag0 -
Browser Cacheing - HTTPS redirects to HTTP
Howdy lovely Moz people. A webmaster redirected https protocol links to http a number of years ago in order to try and capture as many links as possible on a site we now manage. We have recently tried to implement https and realised that because of this existing redirect rule, they are now causing infinite loops when trying to test an http redirect. http redirecting to https redirecting back to http, etc. The https version works by itself weirdly enough. We believe that this is due to the permanent browser caching. So unless users clear their cache, they will get this infinite loop. Does anyone have any advice on how we can get round this? a) index both sites and specify in GSC that the https is the canonical version of the site and hope that Google sees that and removes the http version for the https version b) stick with http as infinite loops will kill the site c) ??????????? Thanks all.
Intermediate & Advanced SEO | | HenryFrance0 -
Clarity needed on 301 redirects
Looking to get a bit of clarity on redirects: We're getting ready to launch a new website with a simplified url structure (we're consolidating pages & content) & I already know that I'll have to employ 301 redirects from the old url structure to the new. What I'm not clear about is how specifc I should be. Here's an example of my file structure: Old website: www.website.com
Intermediate & Advanced SEO | | JSimmons17
New website: www.website.com Old website: www.website.com/vacations
New website: www.website.com/vacations Old website: www.website.com/vacations/costa-rica
New website: www.website.com/vacations/central-america Old website: www.website.com/vacations/costa-rica/guanacaste
New website: www.website.com/vacations/central-america Old website: www.website.com/vacations/mexico
New website: www.website.com/vacations/central-america Old website: www.website.com/vacations/mexico/cancun
New website: www.website.com/vacations/central-america Old website: www.website.com/vacations/bolivia
New website: www.website.com/vacations/south-america Old website: www.website.com/vacations/bolivia/la-paz
New website: www.website.com/vacations/south-america Do I need to redirect each and every page or would just redirecting just the folder be enough to keep my SEO juice? Many thanks in advance for any help!0 -
Canonical tags required when redirecting?
Hello, My client bought a new domain and he wants it to be the main domain of his company. His current domain though has been online for 10 years and ranks pretty well on a few keywords. I feel it is necessary to redirect the old domain to the new one to take advantage of its ranking and avoid any broken links. The sites are exactly the same. Same sections and same content. Is it necessary to place canonical tags on one of the sites to avoid duplicate content/sites? Any thoughts? Thanks
Intermediate & Advanced SEO | | Eblan0 -
301 Redirect how to get those juices flowing
HI Guys Following on from my previous posts i have still not got my rankings back, http://www.seomoz.org/q/301-redirect-have-no-ranking i am beginning to think that i do have a underlying issue in the site which is restricting me My old site www.economyleasinguk.co.uk was moved to www.economy-car-leasing.co.uk, as mentioned the 301 seemed to go really well and all pages updated within 48 hours, however over 5 months on and the juice from the old site is still not pushed over and i hardly rank at all for anything. here are a list of things i have tried 1:Swapped the original 301 which was PHP for an Htaccess 2: added canonical tag to all pages 3: Turned on internal links as per this post by Everett Sizemore http://www.seomoz.org/blog/uncrawled-301s-a-quick-fix-for-when-relaunches-go-too-well number 3 was only done 5 days ago and initially bot traffic was immense, and may need a bit more time to see any results. I still think i have another underlying issue due to the below reasons 1: Page rank on home page is one but inner pages mixture of 1, 2 and 3 sporadically 2: If I copy text from home page no results 3: Open site explorer still has the old site at with a PA of 60 compared to 42 for the new site 4: Checked server logs and Google is visiting old site 5: Header responses are all correct for the canonicals and see no chaining of the 301’s 6: All pages are do follow and no robots restrictions 7: site:has only in the last few days removed the old site from the index naturally it could be that its just a matter of time however 5 months for a 301 is a very long time and 80% traffic loss is immense I would really appreciate it if someone can give the site a once over and see if i have missed anything obvious. Thanks in advance
Intermediate & Advanced SEO | | kellymandingo0 -
Explaining 301 redirects instead of 302
I am trying to explain in layman's terms to a client why using 302 for their redirects (which they have done themselves) is not right. There view is they do not seem to listen or believe what is being said to them and do not want to do permanent damage to the old domain so are using 302 redirects. I have explained over and over 301 is needed but I do not seem to be good at communicating this. Can someone give me a good example or description I can use to get my point across?
Intermediate & Advanced SEO | | JohnW-UK0 -
How long do 301 redirects have to stay in place?
For a large retail site we have plenty of "old" pages that are 2-3 years old and still have 301 redirects to a new page. After a search engine has recognized a 301 redirect and dropped the "Old" URL from the index and started displaying the "New" URL, is it safe to delete that old page and thus remove the 301 redirect?
Intermediate & Advanced SEO | | SEOmoxy0