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
-
Best way to handle Spanish/English WEBSITE
Hey guys, How are you doing? I have a website (www.aceromart.com ) in which the primary language is Spanish. The company is oriented toward the Mexican Audience. However, recently we are dealing with many U.S companies. Also, we want to be included in the Yahoo Directory and several other directories which demand a U.S version of the website. So i want to have a U.S version of the website. My ecommerce is based in the NETWORK Solutions platform and has around 1,000 products and pages. What is the best way to include an English version of the website. Ive seen some pages using the Google traslate tool, which only traslates the text. Hope to hear some of your ideas, Regards,
Web Design | | JesusD0 -
Redirecting Images
Hi, I'm wondering how important it is when relaunching a site on a new platform (switching to Drupal) to serve up images from the same file paths in order to ensure consistency during the changeover. I've tried to keep the questions straightforward so that this post can be useful to people in a similar situation in future: How much difference do the file paths make to SEO? Does Google care or even notice if the image file paths change? Is it worth forcing Drupal to mimic our old file paths for the sake of consistency with the old site in order to maintain rankings OR do we take the opportunity to redesign our file paths for better SEO? Any help would be much appreciated 🙂
Web Design | | Tinhat0 -
301 redirects from old site to new
hey all, we just did a site redesign and have less pages on the new site than the old. is it bad to redirect multiple pages from the old site to the same page on the new? for example redirect ...com/apps ...com/android ...com/mobile and point them all to....com/custom-apps thanks!
Web Design | | jaychow0 -
Best Way To Have HD Videos On Site That Will Work On Mobile Devices
Hi, I hope someone can help me with this. I am working on a site for a client who works at a video production company. They want to have a fair few HD videos on there site but also for the site and videos to be viewable on mobile devices. I have got a responsive wordpress theme and the site is beginning to take shape. I am wondering however how I can best get the videos to display on mobile devices while maintaining a good load speed. Until now I have been using amazon S3 which stores and feeds the videos and I use Easyvideoplayer to embed the videos. The problem is they do not appear to show up from mobile devices when using wordpress. can anyone suggest the best way for me to still feed the videos from S3 but get them to display on mobile devices. oh, they are private videos so they cannot be placed on youtube.
Web Design | | jensonseo0 -
Page Redirection solution
Page Redirection solution needs, there are 2 sites in the same folder and one page of old site is bxxxxxseo.com/products.php new site bxxxxxseo.com/product_list.php .there are many old page indexed i wanna redirect all old pages to relevant pages of new site using SEO friendly way .Any help really appropriate. Thank you
Web Design | | innofidelity0 -
What's the best way to sculpt links on a page?
I know PR isn't a top ranking factor anymore, so "PR sculpting" isn't something to focus on. But isn't it still true that having more links that you need on any given page is worse than having fewer, in terms of that page's authority? I'm managing a site that has a lot of navigational links in the footer, which are duplicative because they're almost all included in the top nav bar, and several are triplicated in the sidebar as well. I wanted to remove 85% of these duplicative links from the footer, thinking they diluted the page authority and that most users probably won't scroll there anyway when we launch the site. The site owner is pushing back, though, not wanting to remove so many links because he believes they might be useful to some users. We can test our respective user-behavior theories after launching, but right now I have two questions: Will having a sizable number of duplicative links in the footer dilute the page's authority? and 2) Are there any other ways to reduce this dilution, aside from simply removing the links? (I know nofollow is not the answer, but possibly using iframes or Java or something like that?)
Web Design | | KyleJB0 -
Optimal redirect configuration from a misspelled domain that we own.
We have a handful of inbound links to www.t-chek.com (note the hyphen). Our normal site is www.tchek.com (no hyphen). We own both domains and have some sort of domain-wide redirect set up now. This works fine for traffic, but I suspect it's not optimal for SEO purposes. I came to this conclusion by looking in OSE and noticing that none of the inbound links to www.t-chek.com were also being attributed to www.tchek.com. 2 questions: Is it immediately evident what type of redirect I have in place now, or do I need to figure that out? Is the fix as simple as editing the .htaccess file on the hyphenated domain? I don't have direct control over the hyphenated domain, and I'd like to be able to know exactly what we need to do so I can request help from my IT department. I'd appreciate hearing your wisdom. Thanks!
Web Design | | SheriGolla0