Can I redirect a URL that has a # in it? How?
-
Hi there -
My web developer is saying that I can't do a URL redirect with a "#" in it. Currently, the URL is actually an anchored link within a page (which the URL indicates with a #). I want to change the content to a new URL, but our website links internally to the old URL, so we would need to do a URL redirect (assume 301).
Can you tell me if this is possible and how?
Thanks!
-
Here is the info on pushstates - as mentioned above: https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history
-
Again, that is not possible because of the #. You can't redirect a browser side page.
There are some tricky things you can do with modern browsers to push things through via ajax but this is another kettle of fish and even then I am not sure that it is possible to 301.
Sorry!
A
-
Hi -
Another restriction - we only want to redirect one of the anchor pages.
e.g., www.website.com/#training1 - we would want to redirect this.
www.website.com/#training2 - we would NOT want to redirect this.
Is this possible?
-
I might be wrong but isn't a # done browser side, so I am not sure this is possible as a search engine can't see the # anyway.
Willing to be proved wrong on this one but think that is the case.......might go and grab one of our techies and check.
-
Hello Daylan,
Would you please share the code you used while redirecting
http://www.website.com/training# to
I mean what code to use if i were to redirect the first url to second (removing the # )
Thanks
-
In appache you can set a re-write rule (for 301's) that would apend everything from the # tag to the redirected url.
EG: website.com/training#1. You could set the rule redirecting the website.com/training to go to awesomesite.com/training and attach the #1 if it existed on the new page.
We've done it on our site a few times.
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
-
301 redirect from dynamic url to static page
Hi, i want to redirect from this old link http://www.g-store.gr/product_info.php?products_id=1735/ to this one https://www.g-store.gr/golf-toualetas.html I have done several attempts but with no result. I anyone can help i will appreciate. My website runs in an Apache server with cpanel. Thank you
Technical SEO | | alstam0 -
SEO URLs: 1\. URLs in my language (Greek, Greeklish or English)? 2\. Αt the end it is good to put -> .html? What is the best way to get great ranking?
Hello all, I must put URLs in my language Greek, Greeklish or in English? And at the end of url it is good to put -> .html? For exampe www.test.com/test/test-test.html ? What is the best way to get great ranking? I am a new digital marketing manager and its my first time who works with a programmer who doesn't know. I need to know as soon as possible, because they want to be "on air" tomorrow! Thank you very much for your help! Regards, Marios
Technical SEO | | marioskal0 -
Google Appending Blog URL inbetween my homepage and product page is it issue with base url?
Hi All, Google Appending Blog URL inbetween my homepage and product page. Is it issue or base url or relative url? Can you pls guide me? Looking to both tiny url you will get my point what i am saying. Please help Thanks!
Technical SEO | | amu1230 -
Temporary Redirect - on nonexistant URL
I'm getting a Temporary Redirect issue on | http://www.luckygemstones.com/botswana-legends.htm http://www.luckygemstones.com/botswana-legends.htm | http://www.luckygemstones.com/page-not-found.htm | 1 | 0 | 302 | YET! There is no such page on my site. I believe I had one once, but has been corrected for a while now. WHY is SEOMOZ picking this up as an error and how can I fix? Kathleen http://www.luckygemstones.com
Technical SEO | | spkcp1110 -
Friendly URL
Can be Friendly URL installed on a custom made jobsite using mod rewrite / apache without any big interference to the system itself? Thank you.
Technical SEO | | tomaz770 -
301 Redirects
Hi, I ran the seomox link report and see that I have an entry for our home page (http://www.trophycentral.com/) and http://www.trophycentral.com/index.html. The index is shown with a 301 redirect. Does this mean that a redirect is already in place to http://www.trophycentral.com/? I want to ensure our traffic is not being split between the two urls, but not sure how to confirm this. Thanks! <colgroup><col width="294"></colgroup><colgroup><col width="81"></colgroup><colgroup><col width="80"></colgroup><colgroup><col width="77"></colgroup><colgroup><col width="214"></colgroup>
Technical SEO | | trophycentraltrophiesandawards
| URL | HTTP Status | Total Links | Page Authority | Number of Linking Root Domains |
| http://www.trophycentral.com/ | 200 | 5746 | 53 | 244 |
| http://www.trophycentral.com/index.html | 301 | 5123 | 42 | 4 |1 -
301 redirect or 302
A client of mine has an international company named www.taxglobalizers.com if you come from Holland they 302 redirect you to the www.taxglobalizers.com/en version of the site and if you come from Holland they redirect with a 302 to www.taxglobalizers.com/nl version. I think it is best to change this in a 301 redirect. Am i correct in this? Kind Regards, Ruud
Technical SEO | | RuudHeijnen0 -
Mobile redirection
Hi, What would be the best practice for mobile detection: Best practice for redirections Best practice for detection and inclusion of a front-end element inviting to a mobile version of the site I found this on www.W3C.org but it's from 2008 and I was wondering if any of you tried different approaches concerning mobile detection. Thanks! GaB
Technical SEO | | Pherogab0