301 Redirect Issue for URL with # and !
-
Hi All,
We had a WIX website and now moved to Wordpress. I m having issue while doing redirecting from old URL to new URL.
Example:
Old Url: http://www.firsttraffic.com.au/#!traffic-management/ccfn
New Url: http://www.firsttraffic.com.au/our-services/traffic-management/
I tried different wordpress plugin but nothing works. I m thinking its due to the # . But How can I to redirection for URL like this .
Thanks
-
Wix is no fun
you can try this
If you want google to use it
Options +FollowSymlinks
RewriteEngine on
rewriterule ^#!traffic-management/ccfn(.*)$ http://www.firsttraffic.com.au/traffic-management/ccfn$1 [r=301,nc]https://support.google.com/webmasters/answer/174992?hl=en
http://www.firsttraffic.com.au/?_escaped_fragment_traffic-management/ccfn
http://www.firsttraffic.com.au/#!traffic-management/ccfn
RewriteEngine On
RewriteRule ^traffic-management/ccfn$ /#!traffic-management/ccfn [L]RewriteEngine On
RewriteRule ^([^-]*)$ /?escaped_fragment=$1 [L]
-
Thomas is correct. You cannot redirect from an URL with a hashtag in it (although it is possible to redirect to an URL with a hastag using escape fragments). Unfortunately, in your case it is the former, and therefore not possible.
-
Yes you are correct it is due to the #. Google does not index anything after the #so if you redirect to itfrom their perspective you might as well be doing nothing. The canonical tag could help. But more importantly why would you want to redirect to a URL with a #in it?
Google only sees this URL as
http://www.firsttraffic.com.au/
NOT http://www.firsttraffic.com.au/#!traffic-management/ccfn
http://www.firsttraffic.com.au/our-services/traffic-management/
you could redirect a new URL or create a substitute URL but if your redirecting is even successfully with a # in you're URL
Makes no sense what I would do is re-created or simply find a different URL to redirect offer to feel BU the homepage is the correct URL Yoast Wordpress SEO premium might be
Able to do it I know that you can do it server-side however tell me what stack you're running and I will send you the instructions on how to redirect. But know this your redirect you know if the homepage Google looks at it that way
all the best, Thomas
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
-
URL Structure for a shopping website
I have a website which currently has a bad URL structure. I would like to change it. Proposed URL Structure: www.website.com www.website.com/category/ www.website.com/category/men/ www.website.com/category/men/jackets www.website.com/category/men/jackets/product-name Is it a good URL structure? I have seen some other website uses their product name right after their root domain. www.website.com/product-name I have also seen another structure which changes like below: www.website.com/womens-jackets/products www.website.com/mens-jackets/products Which is Good URL structure for SEO & users?
Web Design | | BBT-Digital0 -
How can I fix New 4XX Issue on Site Crawl?
Hi all, My recent site crawl shows 27 4xx issues on this website http://www.rrbusinessconsultants.com/ All of them are for 'posts' on this wordpress website. Here is an example of the issue: http://www.rrbusinessconsultants.com/rr-business-consultants-on-the-rise-of-glassdoor-and-how-companies-are-coping/void(null) The blog page seems to be creating links ending in void(null) which are defaulting to 404 pages. I cannot see the links on the site so cannot see how to remove them. Can anyone provide any insight into how to correct his issue? Many thanks in advance.
Web Design | | skehoe0 -
Should I Kill the Old Domain or Work Through the Redirect?
Our IT department wasn't able to create a new directory on the current domain name for whatever reason and so we had to create a new domain name called ww2.domain.com to build the new site. So now we have the new site up and appartly some PDFs and pages are being directed to the from the old site. www.domain.com but 10,000 pages /PDFs are still indexed in Google and are not redirected. So when you open the page you get the old www.domain.com instead of it redirecting to ww2.domain.com. It's sort of a mess! My question is can we just kill the old domain name and move the ww2.domain.com back to the old domain? We also want to do away with the ww2.domain.com and go back to www.domain.com. I know it's confusing as heck! What would you recommend?
Web Design | | Eagle-ABS0 -
When Site:Domain Search Run on Google, SSL Error Appears on One URL, Will this Harm Ranking
Greetings MOZ Community: When a site:domain search is run on Google, a very strange URL appears in the search results. The URL is http://www.nyc-officespace-leader.com:2082/ The page displays a "the site's security certificate is not trusted." This only appears for one URL out of 400. Could this indicate a wider problem with the server's configuration? Is this something that needs to be corrected, and if so how? Our ranking has dropped a lot in the last few months. Thanks,
Web Design | | Kingalan1
Alan0 -
How to setup a redirect from one subfolder to another to avoid duplicate content.
Hello All, I have a WordPress site that Moz says has duplicate content. http://deltaforcepi.com/latest-news/page/3
Web Design | | Michael_Rock
http://deltaforcepi.com/category/latest-news/page/3 So I set up an addition to the .htaccess file . . . redirect code to move from one folder to another RewriteRule ^category/latest-news/(.*)$ /latest-news/$1 [R=301,NC,L] What did I do wrong? I am not proficient in .htaccess files.0 -
Pulling old site-map and URL structure of a site
Hey guys how do I pull an old sitemap or URL structure of a site ! This company I am helping out . Build a new site without any 301 redirect ! It's been about 2 months and hosting company sent me. SQL database file said we basically need to build another site ! Wondering if there are any other ways to see what exact urls were existent before their change over
Web Design | | BizDetox0 -
Javascript changing URL - Thoughts?
So, our developer just created a player at the bottom of this site I work for. It's not really important what it is. The thing is, when you go to our home page now, the javascript changes the url from www.site.com to www.site.com/home It's not actually redirected or anything (no 301, it's just the javascript doing this), but I'm worried that if someone links back to our site they're going to surely pull that URL to point back to, which is wrong. Also, when you go to a category, the URL changes from www.site.com/category to www.site.com/home#category. Again, it's not a redirect but I'm still worried people will link back to this since it's on the entire site now... I'm suggesting that we turn off this new feature until we find a workaround. I just wanted to confirm with you guys that this is best. Thanks
Web Design | | poolguy0 -
Is there any difference in using an underscore vs. a dash in the directory portion of the url?
A friend who is a software developer asked this question regarding the directory portion of the url: Is it better to use dashes or underscores? I know in the domain name Matt Cutts recommends dashes, but what about the directory extension?
Web Design | | RobertFisher0