Code for redirect
-
What is the code to redirect
www.xyz.com/abc where abc is a folder to www.xyz.com/abc.html
-
Hi Atul
This should help http://www.seomoz.org/img/upload/Cheat%20Sheet%20-%20301.png
Here is the full PDF version of Developer's SEO cheat sheet. I found it very useful when dealing with technical SEO issues.
-
I am doing 301 direct using apache server.
what should i write in .htaccess file
-
Hi Atul,
Tom is right - it depends on the server, but the linked-to post should tell you how to do this. If you are using a Microsoft IIS server, this post can help with those redirects.
Jane
-
Hi Atul
That would depend on what type of redirection you're after, 301, 302 and the type of server you are using Apache or ISS. There is a nice post here explaining redirections in detail. It should answer your question.
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
-
Location of Content within the Code Structure
Hi guys,
Technical SEO | | artdivision
When working with advanced modern websites it many times means that in order to achieve the look and feel we end up with pages that has almost 1000 lines of code or more. In some cases it is impossible to avoid it if we are to reach the Client's visual and technical specifications. Say the page is 1000 lines of code, and our content only starts at line 450 onwards, will that have an impact from a Google crawlability, hence affect our SEO making it harder to rank? Thoughts? Dan.0 -
Is an international redirect hurting my ranking
We're a small international company that redirects users based on their language identifier.
Technical SEO | | _entreprenerd
I've now taken a big interest in and also how it affects ranking. When I look at my MOZ dashboard the fundedbyme.com domain has a higher ranking than fundedbyme.com/en/ for example. Our company wants to target other markets such as Spain and Germany, I am imposing penalties on myself by not having rel="canonical" in place and redirecting to the TLD?0 -
Redirecting Several Hundred Pages
As of May 21st 2013 (Penguin 2.0 update) we hit a triple-header and I think we can now officially dubbed the "KING OF GOOGLE PANALTIES"! 😞 -July 2012 - recieved 2 "Unatural Links" email -April 2012 - 20% traffic hit -May 21st 2013 - 35% traffic hit We have/had lots of very low quality links using the same anchor text as well as about 150 very low quality articles and almost 100 categories w/several hundred products that recieved little to no traffic. We have spent the last several weeks cleaning up our link profile and were highly successful in getting most of them removed and have kept detailed reports for our Reconsideration Request for the manual "Unatural Links" penalty. We have also went a step further and have completely redesigned the site that is now much faster/better on-page seo with new, high quality articles and are removing all the low quality articles, categories and products but we are unclear what to do with these. Which brings me to my question. Should we redirect these pages back to the home page or just let them go to 404 error? I have been doing lots of reading on this subject but there doesnt seem to be any good answers. From what I read, neither are good choices and I cannot decide between the lesser of the 2 evil's ..so any help with this would be greatly apreciated! Note:
Technical SEO | | k9byron
-These category and product pages have absolutly no inbound links (link benefit) and in my opinion are only sucking off link juice and generating little to no revenue. There are also no similar categories or products that these could be redirected to. For example, redirecting dog toys to the dog bed category just sounds like it would increase our bounce rate. -Again, the articles also have no link benefit and only a small handful of the articles actually generate any traffic to speak of (several thousand visitors per year) and the rest generate less than 1000 visitors per year. All have high bounce rates and low conversions. It would be nice to keep them live as I think some are okay and could be rewritten/re-purpose over time but maybe in light of our Panda penalty it might be better to just to save them offline, let them go to 404 errors and rewritten/re-purpose them another time? -We did create a very nice 404 page with category navigation and huge search bar so I am leaning more toward this option.
..
Thank in Advance!0 -
What have i done wrong with this facebook comment code
Hi, i have a page here http://www.in2town.co.uk/trip-advisor/african-safari-is-a-dream-holiday-destination and i am trying to have a comment section through facebook on there, and although i have got it on, i think i have done something wrong as i can manage or delete the comments. i have read the instructions but not managing to follow them. i have tried going into the developers section but that just gives me the option of website apps on facebook mobile apps now i have tried going into these but there is no code or anything, so i am not sure what i am doing wrong. the way i have done it is, by just using a joomla module as i work in joomla 1.5 but where it says Facebook comments application ID i have just put my webpage details in there. the module i am using is
Technical SEO | | ClaireH-184886
mod_phoca_facebook_comments any help in finding the application id or the correct way of doing it would be great thanks0 -
301 redirect from Blogger
Hello, I have a client with a Wordpress network of blogs, each blog is owned by a different blogger. Many of them were migrated time ago from Blogger. I have seen that the way used to redirect them is a meta refresh, so no authority is being passed. I cannot find any reliable way of making a 301 from Blogger, There are some plugins, but I'm afraid of using them. Any of you have experience with this situation please? I have even thought about placing a global rel canonical before the meta refresh, but I think that here the problem is the meta refresh itself.... Thank you in advance
Technical SEO | | Juandbbam0 -
Magento- 1675 302 Redirects - How to Fix?
Hi Folks, I would appreciate some help on this. My ecommerce website is built on magento and we currently have 1675 302 Redirects on it as pointed out by the SEOMOZ crawler. Has anyone any idea on how to fix this or ave you being on the same boat as me. Im pretty sure this is why it coming up that I have a lot of dup content on the website also. Help appreciated as always. Thank you!
Technical SEO | | dean19860 -
Redirecting one ecommerce site to another
Hi I'm planning to redirect one large ecommerce site to another. Here's how I was thinking of doing it: crawl both sites with Xenu and export urls to a CSV match urls where possible, redirecting pages from site A to relevant ones in site B all others will be redirected to site B's home page Now, I'm dealing with thousands of URLs here, so any way to make it easier would be great. Could this mean just redirecting all of Site A's pages to Site B's homepage would be worth it? Or does redirecting relevant pages where possible seem the best idea? Thanks guys!
Technical SEO | | neooptic0 -
301 Redirect vs Domain Alias
We have hundreds of domains which are either alternate spelling of our primary domain or close keyword names we didn't want our competitor to get before us. The primary domain is running on a dedicated Windows server running IIS6 and set to a static IP. Since it is a static IP and not using host headers any domain pointed to the static IP will immediately show the contents of the site, however the domain will be whatever was typed. Which could be the primary domain or an alias. Two concerns. First, is it possible that Google would penalize us for the alias domains or dilute our primary domain "juice"? Second, we need to properly track traffic from the alias domains. We could make unique content for those performing well and sell or let expire those that are sending no traffic. It's not my goal to use the alias domains to artificially pump up our primary domain. We have them for spelling errors and direct traffic. What is the best practice for handling one or both of these issues?
Technical SEO | | briankb0