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
-
Redirecting Ecommerce Site
Hi I'm working on a big site migration I'm setting up redirects for all the old categories to point to the new ones. I'm doing this based on relevancy, the categories don't match up exactly but I've tried to redirect to the most relevant alternative. Would this be the right approach?
Intermediate & Advanced SEO | | BeckyKey1 -
URL Too Long vs. 301 Redirect
We have a small number of content pages where the urls paths were setup before we started looking really hard at SEO. The paths are longer than recommended (but not super crazy IMHO) and some of the pages get a decent amount of traffic. Moz suggests updating the URLs to make them shorter but I wonder if anyone has experience with the tradeoffs here. Is it better to mark those issues to be ignored and just use good URLs going forward or would you suggest updating the URLs to something shorter and implementing a 301 redirect?
Intermediate & Advanced SEO | | russell_ms0 -
Shopify Redirects
I work for a company who has a few url issues. One url is www.randomwords.com/random/type:random The other is www.randomwords.com/random/type-random What is the best way to go about this issue?
Intermediate & Advanced SEO | | MasonInteractive0 -
Is this a Correct Time to Use 302 Redirects?
Hi Mozzers! We are going through a rebranding process, and as of this morning we have 3 domains, all with identical content. For example (not real domain names): www.fantastic.com
Intermediate & Advanced SEO | | Travis-W
www.fantasticfireworks.com
www.fireworks.com We are using 3 domains to ease the rebranding transition. We currently only want people to visit 'www.fantastic.com,' and if they visit the other 2 domains we want them redirected. Since we will be using these other domains eventually, should we use 302 redirects instead of 301s? The other domains are new and do not have any domain authority or sites linking in, so we do not need to worry about link juice. Does it really matter what type of redirect we use? Thanks!0 -
Redirecting to a temporary promotion page based on cookies
Hi, Let's say my homepage is www.xxxx.com but I want to redirect users who land on the homepage who don't already have a cookie from the site, to a temporary landing page like www.xxxx.com?AFF_ID=XXXXX as an example, how do I stop Google bot from following that redirect? I don't want Google to cache that as my homepage because I'll lose all rankings?? Thanks!
Intermediate & Advanced SEO | | AdiRste0 -
301 Redirect question
Which is the best way to set up the 301 redirect on my main home page? http://horsebuggy.com to http://www.horsebuggy.com Or does it make a difference? Boodreaux
Intermediate & Advanced SEO | | Boodreaux0 -
Redirect a subdomain to a subdirectory for SEO purposes.
Hi, I have a site on wordpress and I want to add eCommerce to it. We want to go with Shopify but Shopify only allows to host their platform on a subdomain. I like to have it on a subdorectory, so my question is: Would it make sense to redirect the whole subdomain to a subdirectory (move everything from shop.domain.com to domain.com/shop) for SEO purposes? Would Google see these pages as if they were part of the main domain? Thanks! Julien
Intermediate & Advanced SEO | | julienraby0 -
Need advice on local search optimization
HI all, I've found myself in a puzzling position and not quite sure which direction to push my current SEO project so if anyone who's done this particular type of SEO can offer some suggestions I'd be eternaly grateful. I am currently working on a project for a Law Firm based in New Jersey. Lets say the town they are in is Garfield. What I really want to try and achieve is see them appearing in the number one spot whenever anyone within Garfield or the immediate area searches for a lawyer relating to the individuals need. E..g searches like "personal injury lawyers", "real estate lawyer". The problem is I can see how I can easily make it to the number one position if people are specific and enter garfield in the search term but in reality they wouldn't be doing that. An additional problem is that peoples ISP's in garfield aren't located in Garfield, in some cases they're as far away as Newark so when they're doing a search for 'real estate lawyer' google is bringing up results for the Newark based firms. It seems using tools like market samurai to look at the traffic and competition is proving useless as searches like the ones I'm doing for local business are so closely tied to the ISP location I don't really know whether to target broad range searches like "Real Estate Lawyer", or to be really specific and include the town name in my page titles, H1 tags etc... I hope I put across my dilemma and someone can help me chose which direction to go in.. Thanks
Intermediate & Advanced SEO | | davebrown19750