Redirecting URLS on windows
-
Could anyone help out here please.
A client of ours have reveloped their website from HTML to ASP (helpful!). They have 60 odd pages indexed in Google with the .html extension. We need to do a redirect on these pages so that all link juice is passed to the new pages.
What would be the best way to do this please?
-
Hi Mister G,
.htaccess files are the means used for creating redirects in a LAMP setup using an Apache server.
To create redirects on a Windows box you need to use a quite different method.
This quick reference chart for creating redirects should give you the information you need for most normal redirect situations.
However, when working with .htaccess we would normally create a single rule that redirects all .html files to the .aspx file of the same name. Ours is a LAMP shop, so Windows is not our forte, but I believe you can do the same thing with the proviso that your server is set up for it. A little hard since I don't know exactly which Windows Server setup you are dealing with, but This link might help you out in doing that.
Hope that helps,
Sha
-
Thanks Ak1lz
Do htaccess work on a Windows server? I was under the impression they didn't
-
Gather a list of all the old HTML URL's
Gather a list of all the new ASP URL'sFind your .htaccess file. Edit it and start adding this,
Redirect 301 /old-file.html http://www.domain.com/new-file.asp
for each of the old/new URL's
Hope this helps, more info can be found here. Remember the best way would be to do it the right way!
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
-
To update or not to update news URLs ?
We manage a huge daily news website in my small country - keeping this a bit mysterious in case competitors are reading 🙂 Our URL structure is www.companyname.com/news/categoryofnews/title-of-article?id=articleid In this hyperreactive news world, title of articles change frequently (may be ten times a day for the main stories). The question we debate is : should we reflect the modification of the title in the URL or not ? Example : "Trump says he wants to ban search engines" would have URL http://www.companyname.com/news/entertainment/Trump-says-he-wants-to-ban-search-engines?id=12345678 Later in the day the title becomes "Trump denies he suggested banning search engines". Should the URL be modified to http://www.companyname.com/news/entertainment/Trump-denies-he-suggested-banning-search-engines?id=12345678 (option A) or not (option B) ? In Google News it makes no difference because of the sitemap, but in Google organic things are different. At present (option B in place), Google apparently doesn't see that the article has been updated, and shows the initial timestamp which is visually (and presumably SEOwise) not good : our new news looks like old news. Modifiying the URL would solve that issue, but could, may be, create another one : the new URL, being considered a new article, would lose, the acquired weight of the previous one in terms of referrals, social trafic and so on. Or not ? What do you think is the best option ? Thanks for your expertise, Yves
On-Page Optimization | | yves678901 -
What word should I use in my URL for my blog
Should I use the word "blog" in my sub folder as in : http://www.mybusiness.com/blog or should I use http://www.mybusiness.com/news. Is there a difference for when my site is crawled. I understand that a blog works a little differently. Can someone explain the basics?
On-Page Optimization | | graemesanderson0 -
To redirect or not to redirect...That is the question
We have old product data that is being updated (approx 30k sku's). Most of the old pages have been indexed and drive the majority of our online sales. But, the updated products have different titles, H1's, etc and have been re-formatted for the better in terms of usability. So, should we redirect thousands of pages to the new pages? Will Google be ok with that?...or should we reformat the current url's with the new data? And, if we reformat current url's with new data...the fear is that the on-page elements that the pages are being pick up for will get wiped out, (be it the H1 in some cases or the title or alt tag for another, etc) because it's simply too much to retain them during the import. Please share
On-Page Optimization | | nisvision0 -
URL Question
This url looks bad: http://www.patrickmunoz.com/#!classes/c1vw1 And when you click around the page change doesn't actually occur, it's a fade into the next page. I think this is a major problem for rankings. Although pages are crawled: https://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.patrickmunoz.com%2F&oq=site%3A&aqs=chrome.2.69i57j69i58j69i59l3j69i61.3548j0j7&sourceid=chrome&espv=210&es_sm=122&ie=UTF-8 When I search for a simple page - "patrick munoz FAQs" nothing comes up:
On-Page Optimization | | tylerfraser
https://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.patrickmunoz.com%2F&oq=site%3A&aqs=chrome.2.69i57j69i58j69i59l3j69i61.3548j0j7&sourceid=chrome&espv=210&es_sm=122&ie=UTF-8#q=patrick+munoz+|+FAQs Do you think this is a bad url configuration? Thanks! Tyler0 -
Mixing hyphens and underscores in a url
Hello. I am working on a site that was built with underscores in the urls, but only in the page names, not in the subdirectories. All the subdirectories have one-word names. So a typical url is "example.com/sub1/sub2/page_name." We would like to change the name of one of the subdirectories to a name that would be very useful for SEO, but this new name is a hyphenated word, let's call it "new-sub." If we changed "sub2" to "new-sub" then our url would have a mix of underscores and hyphens: example.com/sub1/new-sub/page_name. But if I used "new_sub" instead, google would read the words as connected with an underscore, instead of reading the subdirectory as a hyphenated word, which would be less useful for SEO. It seems like it might be a problem to have a hyphen in a subdirectory and underscores in the page names. But I want the SEO value of the hyphenated word. Any recommendations? Thank you!
On-Page Optimization | | nyc-seo0 -
Duplicate URL for homepage
Hi Gurus, Thank you for reading this question My site is developed in Classic ASP How can i make sure the homepage is not duplicated for http://www.partyrama.co.uk/ http://www.partyrama.co.uk/default.asp http://partyrama.co.uk/ http://partyrama.co.uk/default.asp Regards Sri
On-Page Optimization | | partyrama0 -
Moving our current homepage to a new URL
Our homepage currently speaks to a specific product and we're re-doing our homepage to be more about the brand which links to the product. The current home page has PA of 62 with thousands of links to the page. Question is are there any best practices around this or any risks? So current page is: www.xyz.com which we will be refreshing then moving the existing content to www.xyz.com/product so all the subdirectories gets shifted over 1 Thank in advance for the help!
On-Page Optimization | | JoeLin0 -
Redirecting to a keyword-rich domain URL
It's best practice to choose a domain that has keyword in it. But if someone has just launched a website and the domain name does not have keyword, is it better to purchase a new domain name that has a keyword in the name and redirect existing domain to the new domain? Will that help SEO? (This just launched website does not have any traffic or links yet.)
On-Page Optimization | | Amjath0