Is there a way to redirect URLs with a hash-bang (#!) format?
-
Hi Moz,
I'm trying to redirect www.site.com/locations/#!city to www.site.com/locations/city. This seems difficult because anything after the hash character in the URL does not make it to the server thus cannot be parsed for rewriting.
Is there an SEO friendly way to implement these redirects?
Thanks for reading!
-
Perhaps you could try focussing on the exclamation mark (!).
That you use the HTACCESS file to rewrite the url with the exclamation mark to the url without?
Something like:
RewriteRule ^!(.*) http://www.site.com/locations/$1 [R=301,L]
The exact syntaxis for this statement should come close to this one. I'm not sure that this will work but it might work.
Regards
Jarno -
I don't believe there is a SEO friendly way of doing this. It's possible to redirect using some JavaScript. However, not SEO friendly (as Matt Cutts puts it):
"For a while, we were scanning within JavaScript, and we were looking for links. Google has gotten smarter about JavaScript and can execute some JavaScript. I wouldn't say that we execute all JavaScript, so there are some conditions in which we don't execute JavaScript. Certainly there are some common, well-known JavaScript things like Google Analytics, which you wouldn't even want to execute because you wouldn't want to try to generate phantom visits from Googlebot into your Google Analytics".
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
-
Could a redirecting a homepage mess with seo? if so is there any documentation you could point me too? Thanks!
I have a global page for our site but the global site has the exact same content as the main navigation personal page. If I redirect /index to /personal how much seo damage are we doing?
Web Design | | Miguelquirarte0 -
Affects of a Home Link 301 Permanent Redirect in the Main Nav Bar
Hi I created a home page link in the main nav bar using functions.php request, and this leads to the home page, and it works fine. The logo on the site when clicked, resolves the home page domain.com which is fine. Is it ok to have a home page link in my main nav bar, as well as a clickable logo which on-click returns the web user to the home page also? (any seo implications with the permanent 301 redirects?) I like to give web users the choice especially as not all users are aware that they can click back to the home page by clicking on the logo. I considered breadcrumbs already. Thanks.
Web Design | | SEOguy10 -
How would a redesign, content update and URL change affect ranking?
Hi guys, I have a question that I suspect there is no simple true or false answer to, but perhaps someone has done the same thing as we're pondering wether or not to do? We're taking over an existing site that ranks very well on all the important keywords and is obviously very well liked by Google. The site is today hosted on a sub-domain (xxx.domain.com). When taking over, we'll have to redesign the site and recreate most of the content on the site (unique). The site structure, URLs, incoming links etc. will remain exactly the same. Since we are recreating the site, we also have the opportunity to move the site off the sub-domain and on to the main domain (domain.com/xxx - 85/100 Moz rank) and do a 301 Permanent Redirect on all old URLs. Our long-time experience is that content on the main domain, ranks way better than the sub-domain. The big question is wether or not Google will punish us for both changing the content and the location of the site at the same time? Cheers!
Web Design | | mattbs
Matt0 -
We're considering making notable changes to our website's navigation. Other than 301 redirects from old pages to new, what do I need to consider with this type of move or update?
We would like to make some navigation changes to our website: www.NetGainIT.com, specifically to the services section. I know that I will need a list of 301 redirects if I do not plan on keeping certain pages, but what else do I need to consider?
Web Design | | NetGainTech0 -
Looking to remove SSL because it is causing very slow website download speeds. Does WP have a plugin that redirects SSL urls to non SSL urls?
After some extended debate with our web development team we are considering dropping the SSL from our website because it is adding almost 2 additional seconds to our download speeds. We know there is a SEO boost from having a SSL but we believe the extended download speeds maybe outweighing the benefit. However we are concerned about the SEO implications of having no method possible of redirect SSL to non SSL webpages. Does anybody know of a Wordpress Plugin that can force redirect SSL urls to non SSL urls?
Web Design | | RosemaryB0 -
Existing URL structure and how to handle new pages before migration
Hi there! Currently, our site uses underscores "_" within the url structure. We are moving to Wordpress soon (the site is currently static html) but it will be a couple of months before the migration. Here is an example of the current structure: www.oldsitestructure.com/about_us/success_stories/custom_vinyl_banners When we do change, our url structure will have hyphen's "-" to separate terms, so the preferred new structure will be: www.oldsitestructure.com/about-us/success-stories/custom-vinyl-banners The entire site (with the exception of our Wordpress blog) currently uses the old structure. We have about 10 - 15 pages we will add before our migration, my question is: Should we use the preferred url structure starting NOW or stick with the old one? And set up 301 redirects are part of the migration process? Many thanks!
Web Design | | SEOSponge
Jon0 -
Keywords in url - specific case question
There are a bunch of questions about keywords in the url and so far what I've gathered is that it's good to have them but keep it simple so it doesn't look stuffed. I'm working on redesigning some sites that were originally setup by a group who had no understanding of SEO (or perhaps I should say a misunderstanding) and spent a lot of time stuffing keywords EVERYWHERE. In some cases they weren't too far off but in others I think they just went overboard. One of the areas I'm trying to fix are the paths which leads to the following concerns. One of the sites has a basketball section and through the use of the Adwords keyword tool they determined that most people are searching for "basketball hoops". My first question is, how reliable are the monthly search numbers in the Adwords keyword tool? Are they accurate enough to warrant forming keyword strategies based on the results? As it relates to the url issue, the current tree for the basketball section of the site looks like this: /basketball (the landing page for the whole section, there are other sport specific pages as well) /basketball/hoops (goes nowhere. not sure why they didn't just go to /basketball-hoops/x for other pages) /basketball/hoops/72in-backboards (the systems are split into three different backboard sizes, these pages group them onto one overview page per size) /basketball/hoops/72in-backboards/specific-basketball-goal (the actual basketball goal details page with options to buy and such) So what I'm wondering about this setup is: does having /basketball/hoops take care of having the "basketball hoops" search term or would it be more effective to switch to /basketball-hoops? If it's fine to leave it at /basketball/hoops, do you think it would be beneficial to create an actual page for that path? We found that actually more people search for "basketball basket" than "basketball hoops" so maybe that would be a good page to try to make use of that term and explain maybe why people think "basket" instead of "hoop" and why we call ours "goals" or something. I tend to navigate pages by deleting path arguments and I hate when I land on a nonexistent path so I'm leaning toward changing the paths but just don't know if it's worth it at this point. Additionally, on one of the other sites, we have a domain that is the main keyword we want to rank for: swingsets.com The other company I mentioned then decided to put all of the product pages under: swingsets.com/swing-sets/{category}/{set-height}-{'swing-set'|'playset'|'swingsets'|'play-set'|etc...}/combo{#} So that comes out to look something like this: swingsets.com/swing-sets/outback/5ft-playsets/combo2 I've never liked that path setup. It looks stuffed to me, especially once they start using '5ft-swing-sets' and '6ft-play-set' on other product pages. It's inconsistent which is another issue I have since I tend to surf by path. Another issue with that setup is the final argument of combo{#} but there's nothing I can really do about that because they call the products out as combinations. The only actual product name is the "outback" part. I've been trying to come up with a better path setup for a long time now but again I'm concerned that I may just be wasting my time. The only thing I did do was make the height section consistently {height}-playsets. Is that good enough or should these paths remove /swing-sets from the beginning? The actual /swing-sets page is a good and valuable landing page but then I'm not sure if it remains valuable to keep it in the paths for the product pages afterward. Any insight into this dilemma would be appreciated. I've been stewing over this for a long time and my reasoning always becomes circular since I can see plenty of reasons for keeping them the way they are and simplifying them.
Web Design | | EscaladeSports0 -
How important is URL length?
Is URL length really that important? I have many articles that would lose meaning if the URL was shortened and for most, they would have to be under the root domain instead of under the category in order to fit. Has anyone tested if they were negatively impacted by URL's that are too long?
Web Design | | HMCOE0